mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
fix: user without allow_contact get 403 forbidden when accessing api/member/self_id
This commit is contained in:
parent
e8037beaca
commit
097d4d81dc
@ -10,7 +10,7 @@ class UserPolicy < ApplicationPolicy
|
||||
end
|
||||
|
||||
def show?
|
||||
user.is_admin? or (record.is_allow_contact and record.has_role?(:member))
|
||||
user.is_admin? or (record.is_allow_contact and record.has_role?(:member)) or (user.id == record.id)
|
||||
end
|
||||
|
||||
def create?
|
||||
|
Loading…
x
Reference in New Issue
Block a user