mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
Merge branch 'seeddms-5.0.x' into seeddms-5.1.x
This commit is contained in:
commit
dd1310871f
|
@ -36,6 +36,13 @@ class SeedDMS_Core_Group { /* {{{ */
|
|||
*/
|
||||
protected $_name;
|
||||
|
||||
/**
|
||||
* The comment of the user group
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_comment;
|
||||
|
||||
/**
|
||||
* Back reference to DMS this user group belongs to
|
||||
*
|
||||
|
@ -206,8 +213,14 @@ class SeedDMS_Core_Group { /* {{{ */
|
|||
return true;
|
||||
} /* }}} */
|
||||
|
||||
// $asManager=false: verify if user is in group
|
||||
// $asManager=true : verify if user is in group as manager
|
||||
/**
|
||||
* Check if user is member of group
|
||||
*
|
||||
* @param object $user user to be checked
|
||||
* @param boolean $asManager also check whether user is manager of group if
|
||||
* set to true, otherwise does not care about manager status
|
||||
* @return boolean true if user is member, otherwise false
|
||||
*/
|
||||
function isMember($user,$asManager=false) { /* {{{ */
|
||||
if (isset($this->_users)&&!$asManager) {
|
||||
foreach ($this->_users as $usr)
|
||||
|
@ -228,6 +241,12 @@ class SeedDMS_Core_Group { /* {{{ */
|
|||
return true;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Toggle manager status of user
|
||||
*
|
||||
* @param object $user
|
||||
* @return boolean true if operation was successful, otherwise false
|
||||
*/
|
||||
function toggleManager($user) { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user