AsgardCms / Platform

A modular multilingual CMS built with Laravel 5.
https://asgardcms.com/
MIT License
779 stars 240 forks source link

Problem with User Module custom permission #680

Closed shanakaperera closed 5 years ago

shanakaperera commented 5 years ago

Summary of issue

I have updated one of user role (company_admin) permissions disabling access to some modules like :

User Module
Workshop Module
Blog Module etc...

But did not disable any permissions inside Page Module & Media Module and, all the individual user permissions are are set to "Inherit from role". But the problem is I cannot access to Page & Media (both of them are Vue templates) modules through the company_admin user role even if the required permissions are given. Other modules are working fine without any problem.

TEXje2

Here are the permissions given to the Page & Media Modules of company_admin user role:

0_1547959940598_asgard-permission-role-page.PNG

0_1547960094653_asgard-permission-role-media.PNG

Page & Media Modules permissions of the user under company_admin user role:

0_1547960195981_asgard-permission-usr-page.PNG

0_1547960209320_asgard-permission-usr-media.PNG

I recently figured out that if I click browser back button after the "Not logged in error" popup, it will go back to the required page as it should do in the first place.

alt text

System Details

shanakaperera commented 5 years ago

@nWidart any suggestions ??

nWidart commented 5 years ago

Hi, You mention 2 times company_admin.

You also mention a logged in error, you shouldn't go back when you have that, but actually log in.

shanakaperera commented 5 years ago

@nWidart No, the logged in error comes even if I already logged in to the system at first place. And also the correct permisson has given to the company_admin user role. Under all above mentioned circumstances, it is not possible to get not logged in error.

And sorry, I am not so clear about this line of yours.. "You mention 2 times company_admin."

nWidart commented 5 years ago

Your issue is not clear.

Here are the permissions given to the Page & Media Modules of company_admin user role: Page & Media Modules permissions of the user under company_admin user role:

Why are you mentioning the logged in issue here?

shanakaperera commented 5 years ago

@nWidart As you can see from the attached images, I have given those permissions to the newely created company_admin user role. Which means, If a user with newly created company_admin user role should have all the relevant permisson of the role.

I think it is crystal clear upto this point.

Lets say, there is a user "John" with comapy_admin user role. So John will inherit all the page permissions(create, edit, delete... etc. ). But the problem I have here is even if the user has required permissions I get not logged in error only in vue templates.

shanakaperera commented 5 years ago

Finally, the only solution I could come across was to downgrade asgardcms to Version 2.6.1 which has no vue templates. No any problems with the version 2 regarding the permissions but the media manager does not have the ability to create folders.