SkillAgentSearch skills...

manage-roles-permissions

Create roles, assign permissions on objects and pages, and manage site memberships via Headless Admin User and object collaborators APIs

Install / Use

npx skills add kristianp335/liferay-ai-demo-build-md-files

Installs into whichever agent you are using.

About this skill
♊

Gemini Rules

Gemini CLI config

Quality Score

69/100

Supported Platforms

Gemini CLI

Our assessment of manage-roles-permissions

manage-roles-permissions scores 69/100 on our quality scale, 3838th of 4,586 Development & Engineering skills we index.

Its Gemini Rules is 8.1 KB long, well organised into 17 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.

It has no GitHub stars yet, so there is no community track record; judge it on its content.

Substance
29/30
Structure
20/20
Description
15/15
Adoption
0/20
Freshness
5/15

Maintenance, license and trust

  • We could not determine when the repository was last updated.
  • Our last check on 2026-10-18 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

manage-roles-permissions compared with similar skills

All 4 of these similar skills score higher than manage-roles-permissions; compare them before choosing.

SkillScoreStarsUpdatedFormat
manage-roles-permissions (this skill)by kristianp335690—Gemini Rules
taste-skillby Leonxlnx100101.4k2d agoCLAUDE.md
Agent-Reachby Panniantong100101.2ktodayCLAUDE.md
headroomby headroomlabs-ai10077.6k1d agoCLAUDE.md
ai-job-searchby ai-job-search-dev10063.9k2d agoCLAUDE.md

Frequently asked questions

How do I install manage-roles-permissions?
Run npx skills add kristianp335/liferay-ai-demo-build-md-files. The install tabs above show the steps for each supported agent.
Which AI agents does manage-roles-permissions work with?
It is written for Gemini CLI, as a Gemini Rules file. Other agents that read the same format can often use it too.
Is manage-roles-permissions safe to use?
It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is manage-roles-permissions still maintained?
We could not determine when the repository was last updated.

description: Create roles, assign permissions on objects and pages, and manage site memberships via Headless Admin User and object collaborators APIs. Use when the user asks to add a role, grant permissions, make a page private, or control who can view or edit an object's entries. Requires feature flag LPD-17564 for per entry object permissions. name: manage-roles-permissions


Manage Roles and Permissions

Create roles and assign the minimum required permissions for objects, pages, and sites.

When to Invoke

  • "Create a Reader role", "add a role that can only view Books"
  • "Grant edit permissions on this object to Site Members"
  • "Make this page visible only to authenticated users"
  • "Give the Sales role permission to add and update Orders"
  • Called by liferay-demo-site-initializer during the roles and ACL phase

Prerequisites

Feature flag LPD-17564 is required for the object collaborators API (per object definition permissions). Verify via feature-flags skill.

Workflow

Create a Role

curl \
	--data '{
		"name": "<RoleName>",
		"roleType": "regular",
		"name_i18n": {"en_US": "<Role Display Name>"}
	}' \
	--header "Content-Type: application/json" \
	--request POST \
	--silent \
	--url "http://localhost:${PORT}/o/headless-admin-user/v1.0/roles" \
	--user "test@liferay.com:test"

roleType values:

| Value | Scope | | --- | --- | | regular | Portal wide; applies across all sites | | site | Site scoped; membership and permissions are site specific | | organization | Organization scoped |

Save the returned id as <role-id>.

Assign Users to a Role

# Assign a user account to a regular role

curl \
	--request POST \
	--silent \
	--url "http://localhost:${PORT}/o/headless-admin-user/v1.0/roles/<role-id>/association/user-account/<user-id>" \
	--user "test@liferay.com:test"

For site scoped role assignment, use the role association endpoint scoped to the site (there is no /sites/{id}/site-members endpoint). The site is addressed by its numeric <site-id> here:

curl \
	--request POST \
	--silent \
	--url "http://localhost:${PORT}/o/headless-admin-user/v1.0/roles/<role-id>/association/user-account/<user-id>/site/<site-id>" \
	--user "test@liferay.com:test"

Grant Permissions on an Object Definition

Object level permissions control which roles can create, view, update, or delete entries for that object definition.

Verify this endpoint for your version first (get-openapi MCP tool, or GET /o/object-admin/v1.0/openapi.json). On current DXP, permissions is exposed as a property of the object definition rather than a dedicated /permissions subresource — the PUT below may 404. If it does, set object permissions in Control Panel → Objects → [Object] → Permissions.

curl \
	--data '{
		"permissions": [
			{
				"actionIds": ["VIEW", "PERMISSIONS"],
				"roleId": <role-id>
			}
		]
	}' \
	--header "Content-Type: application/json" \
	--request PUT \
	--silent \
	--url "http://localhost:${PORT}/o/object-admin/v1.0/object-definitions/<definition-id>/permissions" \
	--user "test@liferay.com:test"

Common actionIds for object definitions:

| Action ID | Meaning | | --- | --- | | ADD_OBJECT_ENTRY | Create entries | | VIEW | View the object in site and admin UI | | PERMISSIONS | Manage permissions on this object |

Public Form: Let Guest Create Without Reading

An object registers two resource names and the action decides which to grant on — ADD_OBJECT_ENTRY is not on the [$OBJECT_DEFINITION_CLASS_NAME:…$] resource, and granting it there silently does nothing. rules/guest-access.md has the table and the guest-unsupported set; it is always loaded, so read it there rather than guessing here.

For an anonymous registration, enquiry, or application form, grant creation on the private object and viewing only on the public one. In the initializer tree (resource-permissions.json, see rules/site-initializer-format.md for the scope integers):

[
	{
		"actionIds": ["ADD_OBJECT_ENTRY"],
		"primKey": "0",
		"resourceName": "com.liferay.object#[$OBJECT_DEFINITION_ID:<PrivateObject>$]",
		"roleName": "Guest",
		"scope": "1"
	},
	{
		"actionIds": ["VIEW"],
		"primKey": "0",
		"resourceName": "[$OBJECT_DEFINITION_CLASS_NAME:<PublicObject>$]",
		"roleName": "Guest",
		"scope": "1"
	}
]

Do not add VIEW on the object that receives submissions. Those rows hold whatever the visitor typed — names, emails, addresses — and VIEW at company scope publishes all of them to anonymous users. Write only is the correct posture for a public form, and it is why any count or aggregate over that object has to be denormalized onto the public object rather than computed in the browser (see manage-pages → "Mapping Limits").

Grant Permissions on Object Entries (Requires LPD-17564)

Per entry permissions are managed via the object collaborators API. Ensure LPD-17564 is enabled before calling.

curl \
	--data '{
		"permissions": [
			{
				"actionIds": ["VIEW", "UPDATE"],
				"roleId": <role-id>
			}
		]
	}' \
	--header "Content-Type: application/json" \
	--request PUT \
	--silent \
	--url "http://localhost:${PORT}/o/c/<pluralLabel>/<entry-id>/permissions" \
	--user "test@liferay.com:test"

Common actionIds for object entries:

| Action ID | Meaning | | --- | --- | | VIEW | Read the entry | | UPDATE | Edit the entry | | DELETE | Delete the entry | | PERMISSIONS | Manage permissions on this entry |

Grant Permissions on a Site Page

Page level permissions control visibility and edit access.

curl \
	--data '{
		"permissions": [
			{
				"actionIds": ["VIEW"],
				"roleId": <guest-role-id>
			},
			{
				"actionIds": ["VIEW", "UPDATE"],
				"roleId": <role-id>
			}
		]
	}' \
	--header "Content-Type: application/json" \
	--request PUT \
	--silent \
	--url "http://localhost:${PORT}/o/headless-admin-site/v1.0/sites/<site-erc>/site-pages/<page-erc>/permissions" \
	--user "test@liferay.com:test"

To make a page visible only to authenticated users, remove the VIEW permission from the Guest role. To make it fully private, also remove it from the User role and grant VIEW only to the target role.

Verify Roles and Permissions

# List roles

curl \
	--silent \
	--url "http://localhost:${PORT}/o/headless-admin-user/v1.0/roles" \
	--user "test@liferay.com:test" \
	| jq '[.items[] | {id, name, roleType}]'

# Check permissions on an object definition

curl \
	--silent \
	--url "http://localhost:${PORT}/o/object-admin/v1.0/object-definitions/<definition-id>/permissions" \
	--user "test@liferay.com:test" \
	| jq '.'

Permission Design Principles

  • Assign the minimum set of actionIds that satisfies the workflow requirement.
  • Use site roles (not regular roles) for permissions that should vary per site.
  • The Guest role represents unauthenticated visitors. Remove VIEW from Guest to require login.
  • The User role represents any authenticated user. Remove VIEW from User and grant to a specific role to restrict access.

Creating Users via API — Clear Password and Terms Flags

When creating user accounts through the Headless Admin User API, explicitly clear the password reset and terms of use flags. Otherwise the new user's subsequent REST calls return silent 403s until they complete the password reset and terms acceptance prompts through the UI:

{
	"agreedToTermsOfUse": true,
	"passwordReset": false
}

Include both fields on the create payload where supported. Caveat: agreedToTermsOfUse and passwordReset are not part of the standard headless UserAccount DTO on current DXP — verify against the OpenAPI spec (get-openapi MCP tool, or GET /o/headless-admin-user/v1.0/openapi.json) before relying on them. The reliable way to avoid the first login 403 trap is the preboot bootstrap (terms.of.use.required=false, passwords.default.policy.change.required=false) covered in workspace-init.

Success Signal

TODO / inferred — verify against a running bundle. The Verify Roles and Permissions step above (role listed; granted actionIds present; a user holding only that role is allowed the granted actions and denied the rest) is the observable completion check; confirm on a live bundle.

Related Skills

View on GitHub
GitHub Stars0
CategoryDevelopment
UpdatedNaNy ago
Forks0

Trust signals

68/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

2 medium1 low
manage-roles-permissions — Gemini Rules: Install & Safety Check | SkillAgent