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

Fixes #3286: system items can not be modified like non-system ones #140

Conversation

fanf
Copy link
Member

@fanf fanf commented Mar 8, 2013

No description provided.

@@ -89,6 +89,7 @@ class LDAPConfigurationRuleRepository(
con <- ldap
entry <- con.get(rudderDit.CONFIG_RULE.configRuleDN(id.value)) ?~! "Configuration rule with ID '%s' is not present".format(id.value)
oldCr <- mapper.entry2ConfigurationRule(entry) ?~! "Error when transforming LDAP entry into a Configuration Rule for id %s. Entry: %s".format(id, entry)
isSytem <- if(oldCr.isSystem) Failure("Deleting system rule '%s (%s)' is forbiden".format(oldCr.name, oldCr.id.value)) else Full("OK")
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a typo to me - not sure if it has any impact, but still, I though it was worth mentioning, since everywhere else this is "isSystem".

Copy link
Member Author

Choose a reason for hiding this comment

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

It is, even if it does not have any impact, since it's a fresh variable name here.

@ncharles
Copy link
Member

Looks great, thanks for the improvement

ncharles added a commit that referenced this pull request Mar 19, 2013
…_be_modifiable_by_public_api

Fixes #3286: system items can not be modified like non-system ones
@ncharles ncharles merged commit 1417d36 into Normation:branches/rudder/2.3 Mar 19, 2013
@fanf fanf deleted the bug_3286/dev/system_item_should_not_be_modifiable_by_public_api branch March 15, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants