Class

AuthorizationsSettings

Package: PHPBoost\Member\authorization Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Benoit SAUTEL ben.popeye@phpboost.com Version: PHPBoost 5.2 - last update: 2014 12 22 Since: PHPBoost 3.0 - 2010 03 01 Located at: phpboost/member/authorization/AuthorizationsSettings.class.php

This class manages authorizations settings which deals with all the actions for which you want to restrict access. You can choose who can access to between the different roles existing in PHPBoost:

  • ranks (guest, member, moderator, administrator)
  • groups (members can belong to one or more groups)
  • members (you can tell that only a particular user can access)

This class contains a list of ActionAuthorization that correspond to each action with the associated authorizations.

Methods summary
public
# __construct( array $actions = array() )

Constructs from a list of ActionAuthorization

public ActionAuthorization[]
# get_actions( )

Returns the list of the actions

public
# add_action( ActionAuthorization $action )

Adds an action

public mixed[]
# build_auth_array( )

Builds and returns the authorization array which is formatted at the legacy format to be compliant with legacy code. It's that format that has to be stored and that is used to check authorizations.

public
# build_from_auth_array( array $auth_array )

Sets the authorizations from an authorization array formatted at the legacy format.