Hi Krish,
Thanks for the response.
I tried both the suggested options. But still that user able to edit the profiles in both the cases.
[
{
"uri": "configuration/entityTypes/Record",
"permissions": [
{
"role": "ROLE_DATA_MANAGER",
"filter":"equals(attributes.Flag,'N')",
"access": ["CREATE", "READ", "UPDATE"]
},
{
"role": "ROLE_DATA_MANAGER_READ",
"filter":"equals(attributes.Flag,'Y')",
"access": ["READ"]
}
]
}
]
[
{
"uri": "configuration/entityTypes/Record",
"permissions": [
{
"role": "ROLE_DATA_MANAGER",
"filter":"equals(attributes.Flag,'No')",
"access": ["CREATE", "READ", "UPDATE"]
},
{
"role": "ROLE_DATA_MANAGER_READ",
"filter":"equals(attributes.Flag,'Yes')",
"access": ["READ"]
}
]
}
]
Let me know if there are any other way to achieve it.
------------------------------
Lingasamy Eswaramoorthy
TCS
------------------------------
Original Message:
Sent: 05-09-2024 12:49
From: Radhakrishnan Ramalingam
Subject: Metadata Security for an Entity
if that doesn't work, define two roles instead of one
ROLE_DATA_MANAGER
ROLE_DATA_MANAGER_READ
------------------------------
Radhakrishnan Ramalingam
Architect
San Ramon CA
Original Message:
Sent: 05-09-2024 12:47
From: Radhakrishnan Ramalingam
Subject: Metadata Security for an Entity
Hi there,
I am hoping that the attributes.flag is Yes/No Lookup. If that is the case, did you try with Y and N instead of Yes or No.
------------------------------
Radhakrishnan Ramalingam
Architect
San Ramon CA
Original Message:
Sent: 05-09-2024 02:34
From: Lingasamy Eswaramoorthy
Subject: Metadata Security for an Entity
Hi Team,
I just want to apply the permissions for an entity based on the attribute value for the same role. When am trying below json permission is applied with highest privileges.
[
{
"uri": "configuration/entityTypes/Record",
"permissions": [
{
"role": "ROLE_DATA_MANAGER",
"filter":"equals(attributes.Flag,'No')",
"access": ["CREATE", "READ", "UPDATE"]
},
{
"role": "ROLE_DATA_MANAGER",
"filter":"equals(attributes.Flag,'Yes')",
"access": ["READ"]
}
]
}
]
the expectation is when ever the record has flag value as Y it should be read only and if it is N then role should have all permissions. But when i applied above json, For all the records [read, Create a, Update] is applied.
Thanks,
Linga
------------------------------
Lingasamy Eswaramoorthy
TCS
------------------------------