Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing Permissions with Overwrite Option #3184

Merged

Conversation

miljance
Copy link
Contributor

@miljance miljance commented Mar 5, 2025

Summary

With this change, I have enabled the user to be able to overwrite permission sets contained in the import file. Up until now, the permissions from the import file were merged with the permissions already present in the permission sets.

The majority of changes were done in this repo but the text for a confirmation dialog has been changed in the repo containing the Base App
https://github.com/microsoft/BusinessCentralApps/pull/1287

Description of the problem

Importing user defined permissions sets leaves permissions in inconsistent state.

Users tend to test the permissions sets in multiple rounds in a test system. After they are satisfied with the result they decide to import it in a production. However the outcome of the import is not reliable. Users would like to overwrite current user defined permission set with preserving assignment to the users/security groups. Currently if a permission set is imported there are two problems:

  1. If in a test systems some permissions were reduced to indirect or removed those changes do not get imported into permissions.
  2. If a permission for a certain object is removed in a test system and then exported and imported to production the permission cannot be removed.

That means that importing permission sets is basically "additive" and can only give more "power". There is no easy way to import XX permission sets that are already assigned to users or security groups and that those are imported "as is" in the import file.

Work Item(s)

Fixes #3162
Fixes AB#559224

@miljance miljance requested a review from a team as a code owner March 5, 2025 09:18
@github-actions github-actions bot added AL: System Application From Fork Pull request is coming from a fork labels Mar 5, 2025
@JesperSchulz
Copy link
Contributor

@stkillen, could you give this a review?

@JesperSchulz JesperSchulz requested a review from stkillen March 5, 2025 11:52
@JesperSchulz JesperSchulz added the Integration GitHub request for Integration area label Mar 5, 2025
@github-actions github-actions bot added the Linked Issue is linked to a Azure Boards work item label Mar 5, 2025
@github-actions github-actions bot added this to the Version 27.0 milestone Mar 5, 2025
Copy link
Contributor

@stkillen stkillen left a comment

Choose a reason for hiding this comment

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

Looks good, please resolve the comments and fix the build errors before we can merge.

@miljance miljance force-pushed the ImportingUserDefinedPermissionSets branch from 5360ed4 to ad408b5 Compare March 20, 2025 08:28
@miljance miljance requested review from pri-kise and stkillen March 20, 2025 08:29
Copy link
Contributor

@stkillen stkillen left a comment

Choose a reason for hiding this comment

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

Re-running build and tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AL: System Application From Fork Pull request is coming from a fork Integration GitHub request for Integration area Linked Issue is linked to a Azure Boards work item
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BC Idea]: Importing user defined permissions sets leaves permissions in inconsistent state.
4 participants