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
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
record.user == user || user.admin
|
record.user == user || admin_override
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,16 +10,14 @@ class SynapsePolicy < ApplicationPolicy
|
||||||
end
|
end
|
||||||
|
|
||||||
def show?
|
def show?
|
||||||
# record.permission == 'commons' || record.permission == 'public' || record.user == user
|
record.permission == 'commons' || record.permission == 'public' || record.user == user
|
||||||
true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def update?
|
def update?
|
||||||
# user.present? && (record.permission == 'commons' || record.user == user)
|
user.present? && (record.permission == 'commons' || record.user == user)
|
||||||
true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
record.user == user || user.admin
|
record.user == user || admin_override
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,12 +14,11 @@ class TopicPolicy < ApplicationPolicy
|
||||||
end
|
end
|
||||||
|
|
||||||
def update?
|
def update?
|
||||||
# user.present? && (record.permission == 'commons' || record.user == user)
|
user.present? && (record.permission == 'commons' || record.user == user)
|
||||||
true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
record.user == user || user.admin
|
record.user == user || admin_override
|
||||||
end
|
end
|
||||||
|
|
||||||
def autocomplete_topic?
|
def autocomplete_topic?
|
||||||
|
|
Loading…
Reference in a new issue