[NEW] Option to prevent users from using Invisible status#20084
Merged
sampaiodiego merged 14 commits intodevelopfrom May 5, 2021
Merged
[NEW] Option to prevent users from using Invisible status#20084sampaiodiego merged 14 commits intodevelopfrom
sampaiodiego merged 14 commits intodevelopfrom
Conversation
|
Really nice feature, thank you! Hope this will be able to be included in the future. |
sampaiodiego
approved these changes
May 5, 2021
Merged
Merged
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes (including videos or screenshots)
Add an
adminoption to allow/disallow theInvisiblestatus option from all users. This option is available in theAccountssection.If the option is turned off, the
users.setStatusendpoint is also restricted from users trying to change their status toInvisible, throwing the following error:{ "success": false, "error": "Invisible status is disabled [error-not-allowed]", "stack": "Error: Invisible status is disabled [error-not-allowed]\n at DDPCommon.MethodInvocation.<anonymous> (app/api/server/v1/users.js:425:13)\n at packages/dispatch_run-as-user.js:211:14\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)\n at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)\n at Object.post (app/api/server/v1/users.js:415:10)\n at app/api/server/api.js:394:82\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)\n at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39)\n at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)\n at packages/nimble_restivus/lib/route.coffee:59:33\n at packages/simple_json-routes.js:98:9", "errorType": "error-not-allowed", "details": { "method": "users.setStatus" } }Issue(s)
Fixes #5020
Steps to test or reproduce
adminroleAdministration->AccountssectionFurther comments