1
0
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:
Sylvain 2015-10-07 16:30:38 +02:00
parent e8037beaca
commit 097d4d81dc

View File

@ -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?