Skip to content

How to add Rule (such as Author Rule) to an permission #107

@thanhnambkhn

Description

@thanhnambkhn

Hi,
Do we has feature such as adding Rule to a permission?
Let's images that we has a post Editor Role (with permissions as follow create/ update/ delete a post )
To pass checking permissions Update and delete a post, user needs satisfy two conditions:

  • Assigned to Editor Role
  • Be the author of the current post (Rule is a piece of code which do logic, ex: $post->created_by = $currentUserId) ==> So how to do that?**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions