diff options
| author | wjames5 <will@tekimaki.com> | 2008-04-28 21:14:37 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2008-04-28 21:14:37 +0000 |
| commit | d6242f1a7142aaf966dbf9f740513f6378ad9ce9 (patch) | |
| tree | 2a0dc7a9f607cea568edfed10ca94629ce881e70 /ajax_comments.php | |
| parent | ccf0b8ef27574dd17fade05d1e35fb9e2c14bc27 (diff) | |
| download | liberty-d6242f1a7142aaf966dbf9f740513f6378ad9ce9.tar.gz liberty-d6242f1a7142aaf966dbf9f740513f6378ad9ce9.tar.bz2 liberty-d6242f1a7142aaf966dbf9f740513f6378ad9ce9.zip | |
IMPORTANT PREMISSIONS UPDATE: this migrates comments from gBitUser->hasPermission checks to gContent->hasUserPermission checks where gContent is a reference to the comment tree root. This brings comments into line with content permissions model and lets services effect comment permissions.
Diffstat (limited to 'ajax_comments.php')
| -rw-r--r-- | ajax_comments.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ajax_comments.php b/ajax_comments.php index 6cc5bd5..778dca8 100644 --- a/ajax_comments.php +++ b/ajax_comments.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_liberty/ajax_comments.php,v 1.6 2007/07/26 20:17:47 wjames5 Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/ajax_comments.php,v 1.7 2008/04/28 21:14:37 wjames5 Exp $ * @package liberty * @subpackage functions */ @@ -14,7 +14,7 @@ $staticContent = new LibertyContent(); $gContent = $staticContent->getLibertyObject( $_REQUEST['parent_id'], (!empty($_REQUEST['parent_guid'])?$_REQUEST['parent_guid']:NULL) ); $XMLContent = ""; -if( !$gBitUser->hasPermission( 'p_liberty_post_comments' )) { +if( !$gContent->hasUserPermission( 'p_liberty_post_comments' )) { $statusCode = 401; $XMLContent = tra( "You do not have the required permissions to post new comments" ); } elseif( $gContent->isCommentable() ) { @@ -75,4 +75,4 @@ header("content-type:text/xml"); print_r('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'); print_r($mRet); die; -?>
\ No newline at end of file +?> |
