saimod_sys_security

Extends \SYSTEM\SAI\SaiModule

saimod_sys_security Class provided by System as saimod to manage the system_user, system_rights, system_user_to_rights table

package

SYSTEM\SAI

Methods

API Bug Call to report Bugs

call_bug(string $message, \SYSTEM\API\JSON $data) : null
inherited static

Arguments

$message

string

Bugreport Message

$data

\SYSTEM\API\JSON

Bugreport Data

Response

null

Returns JSON result with success/failure status

API Cache Call to request cached Data (usually js and css)

call_cache(integer $id, \SYSTEM\API\sha1 $ident) : mixed
inherited static

Arguments

$id

integer

Cache id to be queried

$ident

\SYSTEM\API\sha1

Cache ident to be queried

Response

mixed

Returns cached Data from Database

System run Cron Call

call_cron() : \SYSTEM\API\JSON
inherited static

Response

\SYSTEM\API\JSON

Returns JSON result with success/failure status

System File Request Call

call_files(string $cat, string $id = null) : mixed
inherited static

Arguments

$cat

string

File category

$id

string

File name

Response

mixed

Returns JSON result with failure status or streams the File

System State-Pages Request Call

call_pages(integer $group, string $state) : mixed
inherited static

Arguments

$group

integer

Page Group for Statesystem

$state

string

Full name of the State.

Response

mixed

Returns JSON result with data/failure status

System Text Request Call

call_text(mixed $request, \SYSTEM\API\lang $lang) : \SYSTEM\API\JSON
inherited static

Arguments

$request

mixed

Request String for Text API

$lang

\SYSTEM\API\lang

Request Language for given text

Response

\SYSTEM\API\JSON

Returns JSON result with data/failure status

Get all css System Paths required for this Saimod

css() : array
static

Response

array

Returns array of Pathobjects pointing to the saimods css

Default Page anchor to catch all calls not answered by the saimod api

default_page(string $_escaped_fragment_ = null) : string
inherited static

Arguments

$_escaped_fragment_

string

Param for Hashbangcrawling

Response

string

Returns HTML of the defaultpage

Get the Api Group this Api is operating on

get_apigroup() : integer
inherited static

Response

integer

Returns api group id.

API Class function - implement this function and return the Classname

get_class() : string
inherited static

Response

string

Returns your API-Class name

Get default state for this statesystem

get_default_state() : string
inherited static

Response

string

Returns name of the startstate.

Fixes Classnames for sai postfield

get_params(array $params) : array
inherited static

Arguments

$params

array

Params to be corrected

Response

array

Returns array of corrected Params.

Generate the <li> menu for the Saimod Override this

html_li_menu() : string
inherited static

Response

string

Returns HTML of the

  • menu for the Saimod

  • Get all js System Paths required for this Saimod

    js() : array
    static

    Response

    array

    Returns array of Pathobjects pointing to the saimods js

    Check public state for the Saimod.

    right_public() : boolean
    inherited static

    Override this

    Response

    boolean

    Returns true if the saimod is public

    Check rights for the Saimod.

    right_right() : boolean
    inherited static

    Override this

    Response

    boolean

    Returns true if accessable for the user else false

    Generate the HTML for the Saimods startpage

    sai_mod__SYSTEM_SAI_saimod_sys_security() : string
    static

    Response

    string

    Returns HTML for the Saimods startpage

    Add a Right

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_addright(integer $id, string $name, string $description) : boolean
    static

    Arguments

    $id

    integer

    ID of the Right

    $name

    string

    Name of the Right

    $description

    string

    Description of the Right

    Response

    boolean

    Returns true or false

    Add a Right to a User

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_addrightuser(integer $rightid, integer $userid) : boolean
    static

    Arguments

    $rightid

    integer

    ID of the Right

    $userid

    integer

    ID of the User

    Response

    boolean

    Returns true or false

    Change the EMail for the given Account

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_changeemail(integer $user, string $new_email) : \SYSTEM\SAI\json
    static

    Does not send an EMail for authorisation! Does not send an EMail for confirmation!

    Arguments

    $user

    integer

    Username of the Account

    $new_email

    string

    New EMail

    Response

    \SYSTEM\SAI\json

    Returns json with status true or false

    Change the Password for the given Account

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_changepassword(integer $user, string $new_password_sha1) : \SYSTEM\SAI\json
    static

    Arguments

    $user

    integer

    Username of the Account

    $new_password_sha1

    string

    New Password's SHA1-Hash

    Response

    \SYSTEM\SAI\json

    Returns json with status true or false

    Request EMail confirmation for the given Account

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_confirmemail(integer $user) : \SYSTEM\SAI\json
    static

    Arguments

    $user

    integer

    Username of the Account

    Response

    \SYSTEM\SAI\json

    Returns json with status true or false

    Delete an Account

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_deleteaccount(integer $id) : \SYSTEM\SAI\json
    static

    Arguments

    $id

    integer

    Id of the Account

    Response

    \SYSTEM\SAI\json

    Returns json with status true or false

    Delete a Right

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_deleteright(integer $id) : boolean
    static

    Arguments

    $id

    integer

    ID of the Right

    Response

    boolean

    Returns true or false

    Generate HTML for the delete right confirm dialog

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_deleterightconfirm(integer $id) : string
    static

    Arguments

    $id

    integer

    ID of the right

    Response

    string

    Returns HTML

    Delete a Right of a User

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_deleterightuser(integer $rightid, integer $userid) : boolean
    static

    Arguments

    $rightid

    integer

    ID of the Right

    $userid

    integer

    ID of the User

    Response

    boolean

    Returns true or false

    Generate HTML for the Security Groups(Menu)

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_groups() : string
    static

    Response

    string

    Returns HTML

    Generate HTML for the new right dialog

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_newright() : string
    static

    Response

    string

    Returns HTML

    Rename an Account

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_renameaccount(string $username, string $new_username) : \SYSTEM\SAI\json
    static

    Arguments

    $username

    string

    Username of the Account

    $new_username

    string

    New Username

    Response

    \SYSTEM\SAI\json

    Returns json with status true or false

    Generate HTML for the list of rights

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_rights() : string
    static

    Response

    string

    Returns HTML

    Generate HTML for the Analytics

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_stats() : string
    static

    Response

    string

    Returns HTML

    Generate HTML for a User

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_user(string $username) : string
    static

    Arguments

    $username

    string

    Username

    Response

    string

    Returns HTML

    Generate HTML for the Users List

    sai_mod__SYSTEM_SAI_saimod_sys_security_action_users(string $filter = "all", string $search = "%", integer $page) : string
    static

    Arguments

    $filter

    string

    Filter by right

    $search

    string

    Filter by user

    $page

    integer

    Page of the List (displays only 100)

    Response

    string

    Returns HTML

    Static Time-Parameter _ Call to avoid caching and API Errors for JS requests

    static__(mixed $_) : null
    inherited static

    Arguments

    $_

    mixed

    Anticaching Parameter of some Browsers

    Response

    null

    Returns nothing

    Static Call handler for Hashbang-Crawling Requests

    static__escaped_fragment_(string $_escaped_fragment_) : string
    inherited static

    Arguments

    $_escaped_fragment_

    string

    Hashbang-Encoded State

    Response

    string

    Returns your API-HTML result as HTML-Snapshot

    Static Call to change Language for the current Session/User

    static__lang(\SYSTEM\API\lang $lang) : null
    inherited static

    Arguments

    $lang

    \SYSTEM\API\lang

    Language requested

    Response

    null

    Returns nothing

    Static Call to change Result-Type for the current Session/User

    static__result(\SYSTEM\API\result $result) : null
    inherited static

    Arguments

    $result

    \SYSTEM\API\result

    Resulttype

    Response

    null

    Returns nothing

    Internal Function to generate the Tablerow class(color) string according to last time active

    tablerow_class(integer $last_active) : string
    static

    Arguments

    $last_active

    integer

    Unixtimestamp

    Response

    string

    Returns table row class string

    Internal Function to generate HTML for the rights of a User

    user_rights(integer $userid) : string
    static

    Arguments

    $userid

    integer

    Id of the User

    Response

    string

    Returns HTML