Custom method list() created in the controller, but when I access via form on it I get a message. Access denied. (Required permission missing)



  • This post is deleted!


  • @dieter

    @dieter said:

    Custom method liste() created in the controller, but when I access via form on it I get a message. Access denied. (Required permission missing)
    This is a proprietary method liste() with the system-defined index, update etc ... can I access.
    I have changed the permissions from the Admin backend. I can not add the method alone among Newsletter.contacts he puts
    Newsletter.contacts.list on, here the method in the other index, update etc is given. Why can not I Method under Newsletter.contacts

    In the backendRoute.php I have the route set:
    get ( 'contacts/liste', [ 'as' => 'admin.newsletter.contact.liste', 'uses' => 'ContactController@liste']);
    registered.

    In the Permission file I have:
    return [
    'Newsletter.contacts' => [
    'index',
    'Create',
    'Store',
    'Edit',
    'Update',
    'Destroy'
    'liste', // does not view in the backend
    ],
    // append
    'Newsletter.contacts.liste' => [
    'index',
    'Create',
    'Store',
    'Edit',
    'Update',
    'Destroy'
    'liste', // does view in the backend
    ],
    ];

    applied.

    My route in the form is:
    newsletter.contacts.liste

    Method = get

    WHERE CAN I RIGHTS FOR MY OWN METHODS IN THE CONTROLLER TO NOT DEFINE !!
    admin.newsletter.contact.liste liste() is my method im Controller contact

    Many thanks for the help
    Dieter



  • Problem solved.
    Newsletter is a core module as it looks, and there is for the Permission file in the config / asgard.newsletter.permission

    I had made a module and had the wrong permissions.php set the rights.

    Best regards
    Dieter


Log in to reply
 

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.