consistent permissions
This commit is contained in:
parent
615eaf580e
commit
73b82801cc
3 changed files with 6 additions and 9 deletions
|
@ -43,6 +43,6 @@ class MapPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def destroy?
|
||||
record.user == user || user.admin
|
||||
record.user == user || admin_override
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,16 +10,14 @@ class SynapsePolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def show?
|
||||
# record.permission == 'commons' || record.permission == 'public' || record.user == user
|
||||
true
|
||||
record.permission == 'commons' || record.permission == 'public' || record.user == user
|
||||
end
|
||||
|
||||
def update?
|
||||
# user.present? && (record.permission == 'commons' || record.user == user)
|
||||
true
|
||||
user.present? && (record.permission == 'commons' || record.user == user)
|
||||
end
|
||||
|
||||
def destroy?
|
||||
record.user == user || user.admin
|
||||
record.user == user || admin_override
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,12 +14,11 @@ class TopicPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def update?
|
||||
# user.present? && (record.permission == 'commons' || record.user == user)
|
||||
true
|
||||
user.present? && (record.permission == 'commons' || record.user == user)
|
||||
end
|
||||
|
||||
def destroy?
|
||||
record.user == user || user.admin
|
||||
record.user == user || admin_override
|
||||
end
|
||||
|
||||
def autocomplete_topic?
|
||||
|
|
Loading…
Reference in a new issue