#2409 editTag: make compat perm_id option an alias for perm
Merged 2 years ago by tkopecek. Opened 2 years ago by mikem.
mikem/koji fix-edit-tag-perm  into  master

file modified
+1 -1
@@ -5039,7 +5039,7 @@ 

      if options.arches:

          opts['arches'] = koji.parse_arches(options.arches)

      if options.no_perm:

-         opts['perm_id'] = None

+         opts['perm'] = None

      elif options.perm:

          opts['perm'] = options.perm

      if options.unlock:

file modified
+6 -6
@@ -3368,13 +3368,13 @@ 

          raise koji.GenericError("Maven support not enabled")

  

      tag = get_tag(tagInfo, strict=True)

+     if 'perm' in kwargs and 'perm_id' not in kwargs:

+         # for compatibility, perm and perm_id are aliases

+         # if both are given, perm_id takes precedence

+         kwargs['perm_id'] = kwargs['perm']

      if 'perm_id' in kwargs:

-         kwargs['perm_id'] = get_perm_id(kwargs['perm_id'], strict=True)

-     elif 'perm' in kwargs:

-         if kwargs['perm'] is None:

-             kwargs['perm_id'] = None

-         else:

-             kwargs['perm_id'] = get_perm_id(kwargs['perm'], strict=True)

+         if kwargs['perm_id'] is not None:

+             kwargs['perm_id'] = get_perm_id(kwargs['perm_id'], strict=True)

  

      name = kwargs.get('name')

      if name and tag['name'] != name:

@@ -75,7 +75,7 @@ 

          args.append('--unlock')

          args.append('--no-maven-support')

          args.append('--no-include-all')

-         opts = {'perm_id': None,

+         opts = {'perm': None,

                  'locked': not locked,

                  'maven_support': not maven_support,

                  'maven_include_all': not maven_include_all}

1 new commit added

  • fix unit test
2 years ago

pretty please pagure-ci rebuild

2 years ago

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

Commit 144e157 fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago