Method: Scrivito::UserDefinition#can_never
- Defined in:
- app/cms/scrivito/user_definition.rb
#can_never(verb, subject, message = nil) ⇒ Object
Note:
Usually, the memberships of a workspace decide whether a user is allowed or not to perform a specific action. This method lets you add an exception to this logic and thus should be used carefully.
Note:
By default, all users are allowed to create a new workspace. Use this method to forbid a user to create a new workspace.
Adds an explicit rule that forbids the user to execute an action. A rule consists of an action verb, the subject of the action, and an optional message.
79 80 81 82 |
# File 'app/cms/scrivito/user_definition.rb', line 79 def can_never(verb, subject, = nil) assert_no_conflict(:always, verb, subject) @explicit_rules << [:never, verb, subject, ] end |