Local Plugin permission issue not apply on course manager

Re: Local Plugin permission issue not apply on course manager

by Mike Churchward -
Number of replies: 0
Picture of Core developers Picture of Plugin developers Picture of Testers

So the line of code: 

require_capability('local/project:view', context_system::instance());

checks if the user loading that page has the 'local/project:view' capability assigned at the system context.

The error message you are seeing indicates that the user does not have a role with that capability in the context being accessed.

If you want a role to have that capability in the system context, you need to assign that role that capability in the system permissions screen. You assign capabilities to roles at the "System administration / Users / Permissions / Define roles" screen. There, you can make sure that the role has that capability assigned to it, and that the role is able to be assigned at the system level.

mike

Average of ratings: Useful (1)