#3732 Remove deprecated policies
Opened 2 years ago by jcupova. Modified 2 years ago
jcupova/koji issue-3728  into  master

Remove deprecated policies
Jana Cupova • 2 years ago  
file modified
-7
@@ -1046,13 +1046,6 @@ 

              policy_data['target'] = target_info['name']

          if not self.opts.get('skip_tag'):

              policy_data['tag'] = dest_tag  # id

-         # backward-compatible deprecated policies (TODO: remove in 1.33)

-         if not SCM.is_scm_url(src) and not opts.get('scratch'):

-             # let hub policy decide

-             self.session.host.assertPolicy('build_from_srpm', policy_data)

-         if opts.get('repo_id') is not None:

-             # use of this option is governed by policy

-             self.session.host.assertPolicy('build_from_repo_id', policy_data)

          self.session.host.assertPolicy('build_rpm', policy_data)

          if not repo_info:

              repo_info = self.getRepo(build_tag, builds=opts.get('wait_builds'),

@@ -51,12 +51,9 @@ 

  * cg_import: control which content generator imports are allowed

  * vm: control which windows build tasks are allowed

  * dist_repo: control which distRepo tasks are allowed

- * build_rpm: control whether builds are allowed, this is superceding older ``build_from_srpm``

-              to handle all task types. ``build_from_srpm`` and ``build_from_repo_id`` are now

-              deprecated and will be removed in koji 1.33. Default policy allows everything.

- * build_from_srpm [deprecated]: control whether builds from srpm are allowed

+ * build_rpm: control whether builds are allowed, this policy to handle all task types.

+              Default policy allows everything.

  * build_from_scm: control whether builds from the SCM are allowed and the behavior of the SCM

- * build_from_repo_id [deprecated]: control whether builds from user-specified repos ids are allowed

  

  Note that not all policies are access control policies.

  The ``channel`` and ``volume`` policies are used to control which channels tasks go to

@@ -131,11 +131,7 @@ 

  The system currently looks for the following policies

  

  * ``tag``: checked during tag/untag/move operations

- * ``build_from_srpm``: checked when a build from srpm (not an SCM reference) is

-   requested.

  * ``build_from_scm``: checked when a build task from SCM is executing on builder

- * ``build_from_repo_id``: checked when a build from a specified repo id is

-   requested

  * ``package_list``: checked when the package list for a tag is modified

  * ``channel``: consulted when a task is created

  * ``cg_import``: consulted during content generator imports

file modified
-8
@@ -560,14 +560,6 @@ 

      'build_rpm': '''

              all :: allow

              ''',

-     'build_from_srpm': '''

-             has_perm admin :: allow

-             all :: deny Only admin can do this via default policy

-             ''',

-     'build_from_repo_id': '''

-             has_perm admin :: allow

-             all :: deny Only admin can do this via default policy

-             ''',

      'build_from_scm': '''

              has_perm admin :: allow

              # match scm_type CVS CVS+SSH && match scm_host scm.example.com && match scm_repository /cvs/example :: allow

file modified
-1
@@ -400,7 +400,6 @@ 

              }

              if not opts.get('skip_tag'):

                  policy_data['tag'] = dest_tag['id']

-             self.session.host.assertPolicy('build_from_repo_id', policy_data)

          else:

              repo_info = self.getRepo(build_tag['id'])

              repo_id = repo_info['id']