Sitellite Application Framework
Class Tree         Index         All Elements

Class: SessionAcl

Source Location: Program_Root/Session/Acl.php

Class Overview




Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 6]


[ Top ]


Class Variables

$access = array ()

[line 7]


Type:   mixed


[ Top ]

$path =

[line 18]


Type:   mixed


[ Top ]

$prefs = array ()

[line 13]


Type:   mixed


[ Top ]

$resources = array ()

[line 11]


Type:   mixed


[ Top ]

$roles = array ()

[line 9]


Type:   mixed


[ Top ]

$status = array ()

[line 8]


Type:   mixed


[ Top ]

$teams = array ()

[line 10]


Type:   mixed


[ Top ]

$user = array ()

[line 12]


Type:   mixed


[ Top ]

$_prefs = array ()

[line 14]


Type:   mixed


[ Top ]



Class Methods


constructor SessionAcl [line 20]

SessionAcl SessionAcl( [mixed $user = false], [mixed $role = 'anonymous'], [mixed $team = 'core'], [mixed $teams = false])



[ Top ]

method adminRoles [line 451]

array adminRoles( )

Returns the list of roles which are admins.



[ Top ]

method allowed [line 153]

boolean allowed( [mixed $resource = 'documents'], [string $access = 'rw'], [string $type = 'resource'])

Specifies whether the user is allowed to access the requested

resource. $resource may be a string, or an object or associative array with the properties name, sitellite_access, sitellite_status, and optionally, sitellite_team. Valid $access values are r, w, and rw (read, write, and read/write). Valid $type values are resource, access, status, and team.




Tags:

access:  public


Parameters:

mixed   $resource  
string   $access  
string   $type  

[ Top ]

method allowedAccessList [line 310]

array allowedAccessList( )

Returns an array of allowed access levels for the current user.

If the user is allowed to access all levels, this method returns an array containing a single item "all".




Tags:

access:  public


[ Top ]

method allowedSql [line 237]

string allowedSql( )

Returns a piece of SQL that can be slipped into the WHERE clause of a query to check for proper permissions.



Tags:

access:  public


[ Top ]

method allowedStatusList [line 330]

array allowedStatusList( )

Returns an array of allowed statuses for the current user. If the

user is allowed to access all statuses, this method returns an array containing a single item "all". If the user is not an admin user, it will return a single value "approved", because that is the only status non-admins can access.




Tags:

access:  public


[ Top ]

method allowedTeamsList [line 356]

array allowedTeamsList( [boolean $list = false])

Returns an array of allowed teams for the current user. If the

user is not an administrator, in which case teams are not relevant, or if the user is allowed to access all teams, this method returns an array containing a single item "all". This is true unless the $list parameter is set to true, in which case a list of all the teams is returned instead.




Tags:

access:  public


Parameters:

boolean   $list  

[ Top ]

method approvedSql [line 285]

string approvedSql( )

Returns a piece of SQL that can be slipped into the WHERE clause of

a query to check for proper permissions, but that only returns items with a status of "approved". This being separated from allowedSql() allows you to display drafts in private (ie. administrative) lists of items in your code, but by using this method instead on public-facing pages, you can be sure that they will only see actually approved documents, and will still be granted access based on their access privileges.

This method also ignores the sitellite_team value, which allowedSql() does not (providing editing restrictions based on teams).




Tags:

access:  public


[ Top ]

method init [line 62]

void init( [mixed $path = 'inc/conf/auth'])



[ Top ]

method initPrefs [line 94]

void initPrefs( )



[ Top ]

method isAdmin [line 379]

boolean isAdmin( )

Determines whether the current user belongs to an administrative role.



Tags:

access:  public


[ Top ]

method isResource [line 441]

boolean isResource( string $name)

Determines whether the specified resource name exists.



Tags:

access:  public


Parameters:

string   $name  

[ Top ]

method pref [line 395]

mixed pref( string $name)

Returns the value of the specified preference setting.



Tags:

access:  public


Parameters:

string   $name  

[ Top ]

method prefSet [line 410]

mixed prefSet( string $name, mixed $value)

Alters the value of the specified preference setting, in the current session AND in the database. Returns false on failure to update.

Returns the previous value on success.




Tags:

access:  public


Parameters:

string   $name  
mixed   $value  

[ Top ]

method verify [line 111]

void verify( [mixed $userDisabled = false])



[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:16:40 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2