Skip to content

Tell whether a modification reference is editable by its reader - #236

Merged
flomillot merged 11 commits into
mainfrom
feat/expose-permission-on-reference
Oct 5, 2026
Merged

flomillot merged 11 commits into
mainfrom
feat/expose-permission-on-reference

Conversation

@flomillot

@flomillot flomillot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

A modification reference now tells whether its reader may write into the shared modification it points at.

The flag is left out when it could not be resolved, which denies the write just the same.

Consumed by gridsuite/network-modification-server.

A modification reference points at a shared modification, which is also an
element of the directory: the permission the user holds on it decides what
the front-end lets them do with that reference and its content.

The permission is read only, never persisted and never read back by a
server. It is left null when it was not resolved, which a client must not
read as a denial.

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1e6da779-6baa-4fd1-89cc-3843ef6c5233

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
An element the user holds no permission on is answered with no permission at
all, which a client must refuse just as it refuses one it could not resolve:
the two cases never parted ways, and the value distinguishing them was read
by no one. The enum is back to the three the directory knows.

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
Comment thread docs/API.md Outdated
| `referencedId` | `UUID` | UUID of the referenced modification |
| `referenceType` | `Type` | `BASIC` or `DIRECTORY` |
| `referencedInfos` | `ModificationInfos` | Resolved DTO representation |
| `permission` | `PermissionType` | `READ`, `WRITE` or `MANAGE` : the right the user holds on a shared modification |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds weired (the right... holds on ...)
maybe => the user's permission level for a shared modification

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced by the user's permission level on the referenced modification If it's okay.

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
Comment thread src/main/java/org/gridsuite/modification/dto/ModificationReferenceInfos.java Outdated
Comment thread src/main/java/org/gridsuite/modification/dto/PermissionType.java Outdated
Co-authored-by: etiennehomer <etiennehomer@gmail.com>
Comment thread src/main/java/org/gridsuite/modification/dto/PermissionType.java Outdated
Comment thread src/test/java/org/gridsuite/modification/dto/ModificationReferenceInfosTest.java Outdated
…sion held

The permission levels stay between servers: a client only needs to know whether it may write.

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
@flomillot flomillot changed the title Carry the permission of the user on a modification reference Tell whether a modification reference is editable by its reader Sep 30, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

@flomillot
flomillot merged commit a30db02 into main Oct 5, 2026
5 checks passed
@flomillot
flomillot deleted the feat/expose-permission-on-reference branch October 5, 2026 11:02
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.

3 participants