lib/scrivito/user.rb in scrivito_sdk-0.41.1 vs lib/scrivito/user.rb in scrivito_sdk-0.42.0
- old
+ new
@@ -106,11 +106,12 @@
@explicit_rules.each_key { |rule| assert_valid_verb(rule.second) }
end
def can?(verb, workspace)
assert_valid_verb(verb)
- verb == :read && workspace.published? || can_always?(verb, :workspace) ||
- owner_of?(workspace) && !can_never?(verb, :workspace)
+ verb == :read && workspace.published? ||
+ can_always?(verb, :workspace) ||
+ verb != :create && owner_of?(workspace) && !can_never?(verb, :workspace)
end
def can_always?(verb, subject)
assert_valid_verb(verb)
@explicit_rules.has_key?([:can_always, verb, subject])