Hi,
i have added an drop-down field called community in the new user registration page. In here it fetches the available communities from database and shown in the drop down.
Now i want to create an read permission for the user who registered for the selected community.
(example: if John is a new user who try to register through their email, In registration form John select Community1 so when he submit the for the read policy has to create for John uuid with community1 uuid)
I have try this but it shows error like :
An error occurred:
Object { headers: {…}, status: 401, statusText: "OK", url:
"
http://localhost:8080/server/api/authz/resourcepolicies", ok: false,
name: "HttpErrorResponse", message: "Http failure response for
http://localhost:8080/server/api/authz/resourcepolicies: 401 OK", error:
{…} }
error: Object { timestamp: "2023-10-18T07:01:13.751+00:00", status: 401,
error: "Unauthorized", … }
error: "Unauthorized"
message: "Authentication is required"
path: "/server/api/authz/resourcepolicies"
status: 401
timestamp: "2023-10-18T07:01:13.751+00:00"
<prototype>: Object { … }
headers: Object { normalizedNames: Map(5), lazyUpdate: null, lazyInit:
null, … }
message: "Http failure response for
http://localhost:8080/server/api/authz/resourcepolicies: 401 OK"
name: "HttpErrorResponse"
ok: false
status: 401
statusText: "OK"
url: "
http://localhost:8080/server/api/authz/resourcepolicies"
can anyone know how to resolve this error or else how can i get the admin access token