Creating Nodes potentially add permissions to roles that weren't there before
- 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
Assessment
This issue has not been assessed yet.