Repository navigation
Preserve existing ACLs for the everyone principal #918
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
844fa6a
Initial plan
Copilot af52f9f
Protect everyone ACLs by default
Copilot 3344bdd
Merge branch 'develop' into copilot/fix-everyone-principal-permissions
kwin 1efd057
Warn when everyone ACLs are unmanaged by default
Copilot dcb2256
Apply everyone unmanaged regex only during ACE install
Copilot 1251f78
Preserve everyone ACEs during removal only
Copilot 34c676b
Correct everyone ACL management documentation
Copilot dc38126
Apply suggestion from @kwin
kwin d095420
Fix test and message
kwin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,8 @@ | |
|
|
||
| import org.apache.commons.lang3.StringUtils; | ||
|
|
||
| import biz.netcentric.cq.tools.actool.helper.Constants; | ||
|
|
||
| /** User and group part of the AC Tool configuration (natural ordered set of AuthorizableConfigBeans). */ | ||
| public class AuthorizablesConfig extends LinkedHashSet<AuthorizableConfigBean> { | ||
| private static final long serialVersionUID = -253685832563496002L; | ||
|
|
@@ -31,6 +33,10 @@ public class AuthorizablesConfig extends LinkedHashSet<AuthorizableConfigBean> { | |
|
|
||
| @Override | ||
| public boolean add(AuthorizableConfigBean configBean) { | ||
| if (StringUtils.equals(configBean.getPrincipalName(), Constants.PRINCIPAL_EVERYONE) | ||
| && StringUtils.isEmpty(configBean.getUnmanagedAcePathsRegex())) { | ||
| configBean.setUnmanagedAcePathsRegex(".*"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now it does |
||
| } | ||
| AuthorizableConfigBean previous = configBeansByPrincipalId.put(configBean.getPrincipalName(), configBean); | ||
| assert previous == null; | ||
| return super.add(configBean); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Add a WARNING to the history about the added unmanaged ace paths regex when this is installed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a history WARNING when
everyoneis installed with the defaultunmanagedAcePathsRegex: .*, including guidance to configure a narrower regex. Commit:1efd057.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot In order to not warn when this is set explicitly, please remove setting it implicitly here but only when installing ACEs.