Skip to content

Add proper acl permissions implementation#32

Merged
pawl0wski merged 3 commits into
mainfrom
AddProperAclPermissionsImplementation
Apr 26, 2025
Merged

Add proper acl permissions implementation#32
pawl0wski merged 3 commits into
mainfrom
AddProperAclPermissionsImplementation

Conversation

@bwisniewski26
Copy link
Copy Markdown
Contributor

Utworzyłem listę uprawnień dla wszystkich grup w naszej aplikacji oraz poprawne ich przydzielanie na podstawie ich ACL z bazy danych.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a proper ACL permissions mapping system by creating a list of permissions for all groups based on ACLs from the database.

  • Introduces a new PermissionGroupAcls constants class to hold ACL strings
  • Implements a Mapper from PermissionGroup to ACL and vice versa
  • Integrates the mapping in FamilyGroupMember creation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
FamilyVaultServer/Utils/PermissionGroupToAclMapper.cs Maps PermissionGroup enum values to ACL strings via constants
FamilyVaultServer/Utils/PermissionGroupAcls.cs Defines ACL constants for each PermissionGroup
FamilyVaultServer/Utils/AclToPermissionGroupMapper.cs Maps ACL strings back to PermissionGroup enum values
FamilyVaultServer/Models/FamilyGroupMember.cs Uses the new AclToPermissionGroupMapper to set PermissionGroup value
Comments suppressed due to low confidence (2)

FamilyVaultServer/Utils/PermissionGroupToAclMapper.cs:17

  • [nitpick] Consider revising the error message to be more descriptive and grammatically correct, for example: "Invalid PermissionGroup provided."
_ => throw new ArgumentException("Provided not valid PermissionGroup"),

FamilyVaultServer/Utils/AclToPermissionGroupMapper.cs:17

  • [nitpick] Consider revising the error message for clarity, e.g., "Invalid ACL value provided."
_ => throw new ArgumentException("Provided not valid ACL"),

@bwisniewski26 bwisniewski26 requested a review from adama789 April 24, 2025 13:53
@pawl0wski pawl0wski force-pushed the AddProperAclPermissionsImplementation branch from 167dfe5 to 5ea286f Compare April 25, 2025 22:30
@pawl0wski pawl0wski merged commit 0feb464 into main Apr 26, 2025
1 check passed
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