Documentation

Auth
in package
implements AuthInterface

Description of Auth

Tags
author

zozlak

Table of Contents

Interfaces

AuthInterface
Interface for metadata access authorization.

Constants

DEFAULT_ALLOW  = 'allow'
DEFAULT_DENY  = 'deny'

Properties

$authenticated  : bool
$controller  : AuthController
$isAdmin  : bool
$isCreator  : bool
$userName  : string
$userRoles  : array<string|int, string>

Methods

__construct()  : mixed
batchCheckAccessRights()  : void
checkAccessRights()  : void
checkCreateRights()  : void
denyAccess()  : void
getCreateRights()  : DatasetNode
getMetadataAuthQuery()  : QueryPart
Returns (if needed according to the config) an SQL query returning a list of resource ids the current user can read.
getUserName()  : string
getUserRoles()  : array<string|int, string>
isAdmin()  : bool

Constants

DEFAULT_ALLOW

public mixed DEFAULT_ALLOW = 'allow'

DEFAULT_DENY

public mixed DEFAULT_DENY = 'deny'

Properties

$authenticated

private bool $authenticated

$controller

private AuthController $controller

$isAdmin

private bool $isAdmin

$isCreator

private bool $isCreator

$userName

private string $userName

$userRoles

private array<string|int, string> $userRoles

Methods

__construct()

public __construct() : mixed

batchCheckAccessRights()

public batchCheckAccessRights(string $table, string $privilege, bool $metadataRead) : void
Parameters
$table : string
$privilege : string
$metadataRead : bool

checkAccessRights()

public checkAccessRights(int $resId, string $privilege, bool $metadataRead) : void
Parameters
$resId : int
$privilege : string
$metadataRead : bool

checkCreateRights()

public checkCreateRights() : void

denyAccess()

public denyAccess(array<string|int, string> $allowed) : void
Parameters
$allowed : array<string|int, string>
Tags
throws
RepoException

getCreateRights()

public getCreateRights() : DatasetNode
Return values
DatasetNode

getMetadataAuthQuery()

Returns (if needed according to the config) an SQL query returning a list of resource ids the current user can read.

public getMetadataAuthQuery() : QueryPart
Return values
QueryPart

getUserName()

public getUserName() : string
Return values
string

getUserRoles()

public getUserRoles() : array<string|int, string>
Return values
array<string|int, string>

isAdmin()

public isAdmin() : bool
Return values
bool

        
On this page

Search results