Jump to content

ACP Restrictions


Recommended Posts

Posted

Aren't they automatically checked if the url do= matches the restriction key add/edit/manage/delete?

I do see it manually checked in files in function execute(), but I assume that is just to be sure it checks it for the various methods that don't match the key? So i wouldn't need to do my own check in function add(), for instance, if I have a restriction for add?

Posted

When you say against modules, you mean only the _manage one?

Obviously, for nodes, it checks add, move, edit with the various built in methods, as well, but I am talking about when simply extending the dispatcher controller instead of the node one.

I so often get acp restrictions and front end permissions all mixed up for some reason. :)

Posted

Look at applications/core/modules/admin/members/members.php as an example. We don't explicitly check a permission to access the page (because this is tied into the module-level permission), but we do for adding, editing, deleting, etc.

Posted

Why does the permissions edit form have checkmarks next to things when permissions were not even set? Since the person who added the node did not have permission to set permissions, none were done, but for me if I click the permissions lock icon it brings them up with checkmarks in them as if they were set! I even var dumped the permissions for that node and all said NULL.

I can see having checkmarks in default places when ADDING a node, but when editing one, it should have them only where they currently are set to.

Posted
On 4/14/2018 at 2:08 AM, Midnight Modding said:

Why does the permissions edit form have checkmarks next to things when permissions were not even set? Since the person who added the node did not have permission to set permissions, none were done, but for me if I click the permissions lock icon it brings them up with checkmarks in them as if they were set! I even var dumped the permissions for that node and all said NULL.

I can see having checkmarks in default places when ADDING a node, but when editing one, it should have them only where they currently are set to.

This happens if there is no permission row at all saved....in this case the system thinks you are in the middle of adding a new node and is setting recommended permissions on the form with the expectation you are about to save and continue. Moving forward a row is then stored and you wouldn't run into this issue.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...