WIKINDX API trunk

USERACCESS

Access rights for users performing various functions (view, edit, add, delete, . . .).

Note that access for some operations (e.g., is the user a member of a user group and so allowed to view the comments or musings of a resource?) are not checked here but at the local level because they require SQL conditions.

USERACCESS is loaded at startup. When needed, use something like the following: $ua = new USERACCESS(): if ($us->access(string METHOD, [mixed EXTRA])) {...}

access() calls the required method and passes any optional EXTRA parameter to it.

The following methods are defined: isSuper() isAdmin() isReadOnly() viewAttachment() editAttachment(int RESOURCE_ORIGINATOR_ID) viewMetadata() editMetadata([int METADATA_ORIGINATOR_ID]) editComment(int COMMENT_ORIGINATOR_ID) editUrl(int RESOURCE_ORIGINATOR_ID) editResource(int RESOURCE_ORIGINATOR_ID) viewStatistics() viewUserStatistics() editGlobal() editCategory() accessQuarantine([int RESOURCE_ORIGINATOR_ID]) organise(int RESOURCE_ORIGINATOR_ID) organiseList() importBib() pasteBibtex() viewBib(int BIB_ID)

If a method is not found, FALSE is returned. If a parameter is passed to a method and is the incorrect variable type, FALSE is returned. If access is granted, TRUE is returned, otherwise FALSE.

Table of Contents

Properties

$admin  : mixed
$readOnly  : mixed
$super  : mixed
$userId  : mixed

Methods

accessQuarantine()  : bool
editAttachment()  : bool
editCategory()  : bool
editComment()  : bool
editGlobal()  : bool
editMetadata()  : bool
editResource()  : bool
editUrl()  : bool
importBib()  : bool
Import a bibliography
isAdmin()  : bool
An admin can do almost anything—return the bool status of $this->admin
isReadOnly()  : bool
Return the bool status of $this->readOnly
isSuper()  : bool
The super admin can do anything—return the bool status of $this->super
organise()  : bool
When viewing a resource, can a user organise the resources with categories, keywords, languages, etc.?
organiseList()  : bool
When viewing a list, can a user organise the resources with categories, keywords, languages, etc.?
pasteBibtex()  : bool
Import a bibliography by pasting a bibtex file
viewAttachment()  : bool
viewBib()  : bool
View and browse a single user or group or public bibliography
viewMetadata()  : bool
viewStatistics()  : bool
viewUserStatistics()  : bool

Properties

Methods

accessQuarantine()

private accessQuarantine([int $id = 0 ]) : bool
Parameters
$id : int = 0
Return values
bool

editAttachment()

private editAttachment(int $id) : bool
Parameters
$id : int
Return values
bool

editCategory()

private editCategory() : bool
Return values
bool

editComment()

private editComment([mixed $id = FALSE ]) : bool
Parameters
$id : mixed = FALSE
Return values
bool

editGlobal()

private editGlobal() : bool
Return values
bool

editMetadata()

private editMetadata([mixed $id = FALSE ]) : bool
Parameters
$id : mixed = FALSE
Return values
bool

editResource()

private editResource(int $id) : bool
Parameters
$id : int
Return values
bool

editUrl()

private editUrl(int $id) : bool
Parameters
$id : int
Return values
bool

importBib()

Import a bibliography

private importBib() : bool
Return values
bool

isAdmin()

An admin can do almost anything—return the bool status of $this->admin

private isAdmin() : bool
Return values
bool

isReadOnly()

Return the bool status of $this->readOnly

private isReadOnly() : bool
Return values
bool

isSuper()

The super admin can do anything—return the bool status of $this->super

private isSuper() : bool
Return values
bool

organise()

When viewing a resource, can a user organise the resources with categories, keywords, languages, etc.?

private organise([int $id = 0 ]) : bool

Be careful when comparing $id with user ID. A readOnly user has a FALSE id, not 0!

Parameters
$id : int = 0

RESOURCE_ORIGINATOR_ID Default is 0

Return values
bool

organiseList()

When viewing a list, can a user organise the resources with categories, keywords, languages, etc.?

private organiseList() : bool
Return values
bool

pasteBibtex()

Import a bibliography by pasting a bibtex file

private pasteBibtex() : bool
Return values
bool

viewAttachment()

private viewAttachment() : bool
Return values
bool

viewBib()

View and browse a single user or group or public bibliography

private viewBib(int $id) : bool
Parameters
$id : int
Return values
bool

viewMetadata()

private viewMetadata() : bool
Return values
bool

viewStatistics()

private viewStatistics() : bool
Return values
bool

viewUserStatistics()

private viewUserStatistics() : bool
Return values
bool

        
On this page

Search results