Clarify User.update :own in permission sets
Add explicit comments explaining why all permission sets grant User.update with scope :own for password changes.
This commit is contained in:
parent
56144a7696
commit
f1e6a1e9db
1 changed files with 7 additions and 1 deletions
|
|
@ -95,7 +95,9 @@ defmodule Mv.Authorization.PermissionSets do
|
||||||
def get_permissions(:own_data) do
|
def get_permissions(:own_data) do
|
||||||
%{
|
%{
|
||||||
resources: [
|
resources: [
|
||||||
# User: Can always read/update own credentials
|
# User: Can read/update own credentials only
|
||||||
|
# IMPORTANT: "read_only" refers to member data, NOT user credentials.
|
||||||
|
# All permission sets grant User.update :own to allow password changes.
|
||||||
%{resource: "User", action: :read, scope: :own, granted: true},
|
%{resource: "User", action: :read, scope: :own, granted: true},
|
||||||
%{resource: "User", action: :update, scope: :own, granted: true},
|
%{resource: "User", action: :update, scope: :own, granted: true},
|
||||||
|
|
||||||
|
|
@ -125,6 +127,8 @@ defmodule Mv.Authorization.PermissionSets do
|
||||||
%{
|
%{
|
||||||
resources: [
|
resources: [
|
||||||
# User: Can read/update own credentials only
|
# User: Can read/update own credentials only
|
||||||
|
# IMPORTANT: "read_only" refers to member data, NOT user credentials.
|
||||||
|
# All permission sets grant User.update :own to allow password changes.
|
||||||
%{resource: "User", action: :read, scope: :own, granted: true},
|
%{resource: "User", action: :read, scope: :own, granted: true},
|
||||||
%{resource: "User", action: :update, scope: :own, granted: true},
|
%{resource: "User", action: :update, scope: :own, granted: true},
|
||||||
|
|
||||||
|
|
@ -157,6 +161,8 @@ defmodule Mv.Authorization.PermissionSets do
|
||||||
%{
|
%{
|
||||||
resources: [
|
resources: [
|
||||||
# User: Can read/update own credentials only
|
# User: Can read/update own credentials only
|
||||||
|
# IMPORTANT: "read_only" refers to member data, NOT user credentials.
|
||||||
|
# All permission sets grant User.update :own to allow password changes.
|
||||||
%{resource: "User", action: :read, scope: :own, granted: true},
|
%{resource: "User", action: :read, scope: :own, granted: true},
|
||||||
%{resource: "User", action: :update, scope: :own, granted: true},
|
%{resource: "User", action: :update, scope: :own, granted: true},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue