Skip to content

feat: Introduce a new tool to check permissions on a node#314

Open
dgriffon wants to merge 2 commits into
mainfrom
feat-permission-tester
Open

feat: Introduce a new tool to check permissions on a node#314
dgriffon wants to merge 2 commits into
mainfrom
feat-permission-tester

Conversation

@dgriffon

Copy link
Copy Markdown
Member

Description

This tool helps to understand where a given permission is coming from when checked on a given node.

Screenshot 2026-05-17 at 18 00 55

How it works

Input:

principal: username or group, group is identified by the g: prefix
site: global or from a given site
node path: path of the node to check
workspace: live/default
permission: name of the permission to check, leave empty to get all permissions for the given principal/node couple.

Output:

if a permission is provided, the result of a check result of the permission against the node for the provided user.
If the permission is granted, the node / role that bring the permission to the user
If the permission is granted, and the role not found, the tool needs to be improved to catch where the permission is coming from.
A way is to identify the role/node is to put a breakpoint in this method:
https://github.com/Jahia/jahia-private/blob/4a2f6dffe558040058db84b427ae6cef4f2ada0e/core/src/main/java/org/jahia/utils/security/AccessManagerUtils.java#L428
in the return true statements.

The tool display also all permissions granted/deny to the provided node and user/group.

Tests

  • I've provided Unit and/or Integration Tests

@github-actions

github-actions Bot commented May 17, 2026

Copy link
Copy Markdown

🦜 Chachalog

tools minor

Create a new entry online or run npx chachalog@0.5.1 prompt to create a new entry locally.

Introduce a new tool for checking permissions on a node.
@jahia-sonarqube

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant