adding new permission and added in the view as well as new controller i.e limit.manage

Closed
Vanguard - Advanced PHP Login and User Management Vanguard - Advanced PHP Login and User Management September 05, 2018
Login to reply
Godfried van Loo
5 years ago
Resolved.
Milos Stojanovic Support Agent
5 years ago

Hey,

How do you mean you added this in the app folder? What is described inside the ticket I provided a link to is to add overflow-y: auto; CSS property to the element with sidebar class and you can do this either inline or by modifying the app css file (check Customizing Stylesheets article for more info on how to do it). This is the correct solution but, if you want a nicer looking one, then you can add the jquery scroller plugin.

- Milos

Godfried van Loo
5 years ago

2) Check the following ticket. I explained what needs to be done there: https://milos.support-hub.io/tickets/92

i added this in the app folder but it effects on some other styles.
so please give me a proper solution i don't want to add so many files in the project for just single issue.
http://manos.malihu.gr/jquery-custom-content-scroller/ this one.

thanks for reply


Milos Stojanovic Support Agent
5 years ago

Hey,

1) I guess that you did something wrong since you are getting the Reflection exception. There is nothing that you need to do inside the code to add the permission (no need to add any gates or policies or something). You just add the permission from the permissions page and then apply the restrictions inside the code wherever you need it. You should get a good understanding on how permissions work by following the Working with Vanguard Permissions article you mentioned.

2) Check the following ticket. I explained what needs to be done there: https://milos.support-hub.io/tickets/92

- Milos

Godfried van Loo
5 years ago
Milos Stojanovic Support Agent
5 years ago
Thanks for creating a ticket! We'll get back to you as soon as we are back from vacation.
Godfried van Loo
5 years ago

1:

I just have created a new module called.
LIMITS

so i added in the sidebar as well as controller etc,
so now i created new permission and assign to the user like. limit.manage like others in view and in controller too.
@permission('limit.manage')

            <li class="nav-item">      </li>
@endpermission


but i tried to login with that user and open limit /limit section so i got this.

ReflectionException (-1)

Class limit.manage does not exist

i checked in the gate as for other permissions but unable ti understands how you implement the role permissions based system.
so please tell me the steps to add new permissions in steps like you did for the active users in the documentation.

2:
the issue with left sidebar items.

i added 5+ more links in the left sidebar and it stuck and not scoopable so last items are not showing properly.
check attached.

just inspect and copy li and then paste for 5+ times and see the last left sidebar items will hide
 
please reply asap.
thanks