diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2007-07-16 15:27:21 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2007-07-16 15:27:21 +0000 |
| commit | c241682c31b81b26963f859b512de08a4f714bf7 (patch) | |
| tree | f7a705e4de225712120e81494a73a504ef6ac30c | |
| parent | 36a35e20127d7535c66a2abcb6aa5a8df61613c0 (diff) | |
| download | pigeonholes-c241682c31b81b26963f859b512de08a4f714bf7.tar.gz pigeonholes-c241682c31b81b26963f859b512de08a4f714bf7.tar.bz2 pigeonholes-c241682c31b81b26963f859b512de08a4f714bf7.zip | |
Add m(Admin|Edit|View)ContentPermission to various classes. update LibertyContent::has(Admin|Edit|View)Permission to work with new values. To make use of these new permission checks simply use $gContent->hasEditPermission(). Please check to see if i inserted the correct permissions in all classes. new admin permission added to treasury.
| -rw-r--r-- | Pigeonholes.php | 9 | ||||
| -rw-r--r-- | admin/schema_inc.php | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Pigeonholes.php b/Pigeonholes.php index 115baa2..64fbe8e 100644 --- a/Pigeonholes.php +++ b/Pigeonholes.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.92 2007/07/16 11:15:38 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.93 2007/07/16 15:27:21 squareing Exp $ * * +----------------------------------------------------------------------+ * | Copyright ( c ) 2004, bitweaver.org @@ -17,7 +17,7 @@ * Pigeonholes class * * @author xing <xing@synapse.plus.com> - * @version $Revision: 1.92 $ + * @version $Revision: 1.93 $ * @package pigeonholes */ @@ -53,6 +53,11 @@ class Pigeonholes extends LibertyAttachable { $this->mContentId = $pContentId; $this->mStructureId = $pStructureId; $this->mContentTypeGuid = PIGEONHOLES_CONTENT_TYPE_GUID; + + // Permission setup + $this->mViewContentPerm = 'p_pigeonholes_view'; + $this->mEditContentPerm = 'p_pigeonholes_edit'; + $this->mAdminContentPerm = 'p_pigeonholes_edit'; // use edit until we find the need for an admin permission } /** diff --git a/admin/schema_inc.php b/admin/schema_inc.php index 1e7e751..ad59a40 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -47,6 +47,7 @@ $gBitInstaller->registerUserPermissions( PIGEONHOLES_PKG_NAME, array( array( 'p_pigeonholes_view', 'Can view pigeonholes', 'basic', PIGEONHOLES_PKG_NAME ), array( 'p_pigeonholes_insert_member', 'Can insert content into an existing pigeonhole', 'registered', PIGEONHOLES_PKG_NAME ), array( 'p_pigeonholes_edit', 'Can edit pigeonholes', 'editors', PIGEONHOLES_PKG_NAME ), + //array( 'p_pigeonholes_admin', 'Can administer all aspects of pigeonholes', 'editors', PIGEONHOLES_PKG_NAME ), ) ); ?> |
