Cannot get user roles list creating new policy condition

Created on 23 March 2023, over 1 year ago

Problem/Motivation

Cannot add access rule based on user role because user role lookup is empty (and needed).

Steps to reproduce

- add new rule on policy
- chose "Has reference to role on current user"
- click add rule

πŸ› Bug report
Status

Closed: works as designed

Version

1.0

Component

User interface

Created by

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

Comments & Activities

  • Issue created by @recursio
  • πŸ‡ΊπŸ‡ΈUnited States partdigital

    Hi @recursio

    Currently it's not possible to restrict by role from the policy (this is coming in 1.0.x-alpha6). The current plugin allows you to restrict content by role from the node.

    To restrict content by role please do the following:

    1. Add a Role entity reference field to the content type.
    2. Create a new access policy.
    3. Enable that access policy for that content type
    4. Add "Has reference to role on current user" access rule.
    5. From the settings expand Widget settings > Show widget
    6. Save the rule and policy.
    7. Create a new node
    8. Go to the Access tab
    9. Observe that it shows the drop down of roles.
  • Status changed to Closed: works as designed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States partdigital
Production build 0.69.0 2024