LGTM: Use explicit string concatenation
Implicit string concatenation is technically correct, too. But when combined in list, it's confusing for both human eye and static code analysis. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
1 parent
f60b2c5906
commit
5d02c6aaeb
2 files changed
+21
-19
No files matched your search
+6
-6
@@ -532,15 +532,15 @@ class API(ReadOnly):
|
||||
formatter=IPAHelpFormatter(),
|
||||
usage='%prog [global-options] COMMAND [command-options]',
|
||||
description='Manage an IPA domain',
|
||||
version=('VERSION: %s, API_VERSION: %s'
|
||||
% (VERSION, API_VERSION)),
|
||||
version=('VERSION: %s, API_VERSION: %s' %
|
||||
(VERSION, API_VERSION)),
|
||||
epilog='\n'.join([
|
||||
'See "ipa help topics" for available help topics.',
|
||||
'See "ipa help <TOPIC>" for more information on a '
|
||||
'specific topic.',
|
||||
'See "ipa help <TOPIC>" for more information on '
|
||||
+ 'a specific topic.',
|
||||
'See "ipa help commands" for the full list of commands.',
|
||||
'See "ipa <COMMAND> --help" for more information on a '
|
||||
'specific command.',
|
||||
'See "ipa <COMMAND> --help" for more information on '
|
||||
+ 'a specific command.',
|
||||
]))
|
||||
parser.disable_interspersed_args()
|
||||
parser.add_option("-h", "--help", action="help",
|
||||
|
||||
@@ -1541,12 +1541,14 @@ def ensure_entry(dn, **attrs):
|
||||
def configure_profiles_acl():
|
||||
"""Allow the Certificate Manager Agents group to modify profiles."""
|
||||
new_rules = [
|
||||
'certServer.profile.configuration:read,modify:allow (read,modify) '
|
||||
'group="Certificate Manager Agents":'
|
||||
'Certificate Manager agents may modify (create/update/delete) and read profiles',
|
||||
'certServer.profile.configuration:read,modify' +
|
||||
':allow (read,modify) group="Certificate Manager Agents"' +
|
||||
':Certificate Manager agents may modify (create/update/delete) ' +
|
||||
'and read profiles',
|
||||
|
||||
'certServer.ca.account:login,logout:allow (login,logout) '
|
||||
'user="anybody":Anybody can login and logout',
|
||||
'certServer.ca.account:login,logout' +
|
||||
':allow (login,logout) user="anybody"' +
|
||||
':Anybody can login and logout',
|
||||
]
|
||||
return __add_acls(new_rules)
|
||||
|
||||
@@ -1554,20 +1556,20 @@ def configure_profiles_acl():
|
||||
def configure_lightweight_ca_acls():
|
||||
"""Allow Certificate Manager Agents to manage lightweight CAs."""
|
||||
new_rules = [
|
||||
'certServer.ca.authorities:list,read'
|
||||
':allow (list,read) user="anybody"'
|
||||
'certServer.ca.authorities:list,read' +
|
||||
':allow (list,read) user="anybody"' +
|
||||
':Anybody may list and read lightweight authorities',
|
||||
|
||||
'certServer.ca.authorities:create,modify'
|
||||
':allow (create,modify) group="Administrators"'
|
||||
'certServer.ca.authorities:create,modify' +
|
||||
':allow (create,modify) group="Administrators"' +
|
||||
':Administrators may create and modify lightweight authorities',
|
||||
|
||||
'certServer.ca.authorities:delete'
|
||||
':allow (delete) group="Administrators"'
|
||||
'certServer.ca.authorities:delete' +
|
||||
':allow (delete) group="Administrators"' +
|
||||
':Administrators may delete lightweight authorities',
|
||||
|
||||
'certServer.ca.authorities:create,modify,delete'
|
||||
':allow (create,modify,delete) group="Certificate Manager Agents"'
|
||||
'certServer.ca.authorities:create,modify,delete' +
|
||||
':allow (create,modify,delete) group="Certificate Manager Agents"' +
|
||||
':Certificate Manager Agents may manage lightweight authorities',
|
||||
]
|
||||
return __add_acls(new_rules)
|
||||
|
||||
Reference in new issue
Block a user