public static function check_can_manage_data_registry($contextid = false) {
        if ($contextid) {
            $context = \context_helper::instance_by_id($contextid);
        } else {
            $context = \context_system::instance();
        }

        require_capability('tool/dataprivacy:managedataregistry', $context);
    }
public static function check_can_manage_data_registry($contextid = false) {
        if ($contextid) {
            $context = \context_helper::instance_by_id($contextid);
        } else {
            $context = \context_system::instance();
        }

        require_capability('tool/dataprivacy:managedataregistry', $context);
    }
public static function check_can_manage_data_registry ( $ contextid = false ) { if ( $ contextid ) { $ context = \ context_helper :: instance_by_id ( $ contextid ) ; } else { $ context = \ context_system :: instance ( ) ; } require_capability ( 'tool/dataprivacy:managedataregistry' , $ context ) ; }
Checks if the current user can manage the data registry at the provided id.

@param int $contextid Fallback to system context id.
@throws \required_capability_exception
@return null
Checks if the current user can manage the data registry at the provided id .