This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

kiwi
kiwi

Hello! I can't find how to extend and create a specific permission for user into X widget. Example: User1 -> he can see WidgetX but User2 not. [] https://octobercms.com/docs/plugin/registration#navigation-permissions Cheers, Gus.

kiwi
kiwi

Any idea? It's possible?

alfatia102834
alfatia102834

Hi,

You have define the permissions name at the registerNavigation() function like

 'permissions' => ['acme.blog.access_posts']  
then you should you should set that name at the registerPermissions() function in your widget like it's explained at the DOCS.


public function registerPermissions()
{
    return [
        'acme.blog.access_posts'       => ['label' => 'Manage the blog posts'],
        'acme.blog.access_categories'  => ['label' => 'Manage the blog categories']
    ];
}

After that you can manage this news permissions at your settings in the backend, create a new user group and set the user to that group after that you can define if that group of users have permissions to this ones you have just created.

Last updated

planetadeleste
planetadeleste

@alfatia102834
This permissions are for page access, not for widget access. I make a group without system permission, and the System widget can be used on that group. I think @gus need a widgets permission, that October don't have right now, I think.

shina
shina

Any ideas about this topic?

Maybe check user permissions when registering the widgets? (registerReportWidgets method)

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.