Add "Administer subscription types" permission

Created on 29 April 2021, over 3 years ago
Updated 12 July 2024, 4 months ago

Problem/Motivation

Right now, the subscription types administration uses the "Administer subscriptions" permissions. This is not enough since you may want to give "Administer subscriptions" for roles and don't want them to administer subscription types.

Steps to reproduce

  1. Create a new role that has access to Commerce administration
  2. Give this role "Administer subscriptions"
  3. Create a new user with this new role
  4. They will be able to access subscription types administration

Proposed resolution

  1. Add a new "Administer subscriptions" permission
  2. Set it as the permission for accessing subscription types administration
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇧🇷Brazil recidive

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands huijse

    Patch #4 works.

    Test result:
    With: administer commerce_subscription
    You cannot access the subscription type configuration, but can see the subscription overview on:
    admin/commerce/subscriptions which was the point.

    With permission: administer commerce_subscription_types
    You get access to: admin/commerce/config/subscriptions/subscription-types

    Which is needed for admins to make configurations but not subscription managers.

  • Issue was unassigned.
  • 🇺🇸United States DamienMcKenna NH, USA

    As a reminder - when you finish your work on an issue please set the "Assigned" field back to "Unassigned".

    • jsacksick committed 286c0717 on 8.x-1.x
      Issue #3211471 by recidive, mhawwari, jsacksick: Add "Administer...
  • Status changed to Fixed 5 months ago
  • 🇮🇱Israel jsacksick

    For consistency sake, renamed the permission to "administer commerce_subscription_type". (this is what we do for order types and product types).
    However, for product types and order types, the path is: admin/commerce/config/order-types, and admin/commerce/config/product-types. If we remove "subscriptions" from the path then the breadcrumb doesn't append the parent "Subscriptions" config page...

    So keeping the path as in the patch, but also wondering if we shouldn't change it to:
    /admin/commerce/config/subscriptions/types. I don't think there's a need to repeat subscription twice in the path... But could be a followup.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024