diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2007-07-06 16:37:22 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2007-07-06 16:37:22 +0000 |
| commit | e89540d4bfe24cf650511e138b7e16e46d1bc3c8 (patch) | |
| tree | 49bd4e19aa711708862f258170872eca6ff95655 /read.php | |
| parent | 61d47f9b1c26deb96a0c835046bb2a477f67c1df (diff) | |
| download | articles-e89540d4bfe24cf650511e138b7e16e46d1bc3c8.tar.gz articles-e89540d4bfe24cf650511e138b7e16e46d1bc3c8.tar.bz2 articles-e89540d4bfe24cf650511e138b7e16e46d1bc3c8.zip | |
move to gContent perm functions to fully support liberty content permissions
Diffstat (limited to 'read.php')
| -rw-r--r-- | read.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_articles/read.php,v 1.20 2007/06/23 18:27:41 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_articles/read.php,v 1.21 2007/07/06 16:37:22 squareing Exp $ * @package article * @subpackage functions */ @@ -28,14 +28,14 @@ if( !$gContent->isValid() ) { // additionally we need to check if this article is a submission and see if user has perms to view it. if( $gContent->getField( 'status_id' ) != ARTICLE_STATUS_APPROVED ) { - if( !( $gBitUser->hasPermission( 'p_articles_edit_submission' ) || $gBitUser->hasPermission( 'p_articles_approve_submission' ))) { + if( !( $gContent->hasUserPermission( 'p_articles_edit_submission' ) || $gContent->hasUserPermission( 'p_articles_approve_submission' ))) { $gBitSystem->fatalError( tra( "Permission denied you cannot view this article" )); } } // we also need to check and see if the article is future dated - we will display it if the user can edit it otherwise we pretend it does not exist. $timestamp = $gBitSystem->getUTCTime(); -if ( ($gContent->mInfo['publish_date'] > $timestamp) && !$gBitUser->hasPermission( 'p_articles_edit' ) ){ +if ( ($gContent->mInfo['publish_date'] > $timestamp) && !$gContent->hasUserPermission( 'p_articles_edit' ) ){ $gBitSystem->fatalError( tra( 'Article cannot be found' )); } |
