FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
Fossology\Lib\Auth\Auth Class Reference

Contains the constants and helpers for authentication of user. More...

Collaboration diagram for Fossology\Lib\Auth\Auth:
Collaboration graph

Static Public Member Functions

static getUserId ()
 Get the current user's id. More...
 
static getGroupId ()
 Get the current user's group id. More...
 
static isAdmin ()
 Check if user is admin. More...
 
static isClearingAdmin ()
 Check if user is clearing admin. More...
 

Public Attributes

const USER_NAME = 'User'
 
const USER_ID = 'UserId'
 
const GROUP_ID = 'GroupId'
 
const USER_LEVEL = 'UserLevel'
 
const PERM_NONE = 0
 
const PERM_READ = 1
 
const PERM_WRITE = 3
 
const PERM_CADMIN =5
 
const PERM_ADMIN =10
 

Detailed Description

Contains the constants and helpers for authentication of user.

Permissions See https://github.com/fossology/fossology/wiki/Permissions-and-Groups

Definition at line 34 of file Auth.php.

Member Function Documentation

static Fossology\Lib\Auth\Auth::getGroupId ( )
static

Get the current user's group id.

Returns
int Group id

Definition at line 78 of file Auth.php.

static Fossology\Lib\Auth\Auth::getUserId ( )
static

Get the current user's id.

Returns
int User id

Definition at line 69 of file Auth.php.

static Fossology\Lib\Auth\Auth::isAdmin ( )
static

Check if user is admin.

Returns
boolean True if user is an admin, false otherwise.

Definition at line 87 of file Auth.php.

static Fossology\Lib\Auth\Auth::isClearingAdmin ( )
static

Check if user is clearing admin.

Returns
boolean True if user is an clearing admin or more, false otherwise.

Definition at line 96 of file Auth.php.

Member Data Documentation

string Fossology\Lib\Auth\Auth::GROUP_ID = 'GroupId'

Session variable name containing group id

Definition at line 44 of file Auth.php.

int Fossology\Lib\Auth\Auth::PERM_ADMIN =10

Add/delete users and groups. This is the 'superuser' permission.

Definition at line 63 of file Auth.php.

int Fossology\Lib\Auth\Auth::PERM_NONE = 0

No permissions

Definition at line 51 of file Auth.php.

int Fossology\Lib\Auth\Auth::PERM_READ = 1

Read only permission

Definition at line 54 of file Auth.php.

int Fossology\Lib\Auth\Auth::PERM_WRITE = 3

DB writes permitted

DB writes permitted, with additional clearing permissions.

Definition at line 57 of file Auth.php.

string Fossology\Lib\Auth\Auth::USER_ID = 'UserId'

Session variable name containing user id

Definition at line 41 of file Auth.php.

string Fossology\Lib\Auth\Auth::USER_LEVEL = 'UserLevel'

Session variable name containing user permission level

Definition at line 47 of file Auth.php.

string Fossology\Lib\Auth\Auth::USER_NAME = 'User'

Session variable name containing user name

Definition at line 38 of file Auth.php.


The documentation for this class was generated from the following file: