Skip to content

Commit

Permalink
fix: jans-linux-setup create scope if inum exists (ref: #3097)
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Nov 29, 2022
1 parent 52a7f34 commit 46549b9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ def generate_configuration(self):
for scope_level in scope_levels:
for scope in (condition.get(scope_level, [])):

if not scope.get('inum'):
continue

if Config.installed_instance and self.dbUtils.search('ou=scopes,o=jans', search_filter='(&(jansId={})(objectClass=jansScope))'.format(scope['name'])):
continue

if not scope['name'] in scopes:
inum = scope['inum']
if not inum:
inum = '1800.' + scope_levels[scope_level] + '.' + os.urandom(4).hex().upper()
scope_dn = 'inum={},ou=scopes,o=jans'.format(inum)
scopes[scope['name']] = {'dn': scope_dn}
display_name = 'Config API scope {}'.format(scope['name'])
Expand Down

0 comments on commit 46549b9

Please sign in to comment.