gentics / gentics/mesh

Creating Nodes potentially add permissions to roles that weren't there before

Open
#144 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
593
Forks
123
Avg merge
2d 18h
Merged PRs (30d)
4

Description

## Gentics Mesh Version, operating system, or hardware.
- v0.10.3

## Operating System
- MacOSX

## JVM
- Oracle JDK 1.8.0_100

## Problem
When creating a node, Gentics Mesh grants all roles all permissions (read, create, update, delete, readPublished, publish) on the newly created node, if they would have been able to create the object in the first place. For the newly created node a role and its users might end up with more permissions than they have for other nodes (e.g. the parent node).

## Reproducer
Role A with following permissions on nodes (Node X)
```json
{
"read":true,
"create":true,
"update":true,
"delete":false,
"readPublished":true,
"publish":true
}
```
User Mary has Role A

Role B has following permissions on Node X
```json
{
"read":true,
"create":true,
"update":true,
"delete":true,
"readPublished":true,
"publish":false
}
```
User John has Role B

Mary then creates Node NEW in parent Node X

## Expected behaviour and actual behaviour

**Expected permissions for Role A and B:**
Role A permissions for Node NEW
```json
{
"read":true,
"create":true,
"update":true,
"delete":false,
"readPublished":true,
"publish":true
}
```

Role B permissions for Node NEW
```json
{
"read":true,
"create":true,
"update":true,
"delete":true,
"readPublished":true,
"publish":false
}
```

**Actually, permissions for Node NEW for both Roles A and B are as follows**
```json
{
"read":true,
"create":true,
"update":true,
"delete":true,
"readPublished":true,
"publish":true
}
```
* Mary and other users of Role A are then able to delete Node NEW
* John and other users of Role B are then able to publish Node NEW

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.