Update of /cvsroot/phpslash/phpslash-ft/class
In directory usw-pr-cvs1:/tmp/cvs-serv4030/phpslash-ft/class
Modified Files:
Story.class
Log Message:
new perm storyeditor
Index: Story.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Story.class,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** Story.class 15 Apr 2002 13:13:08 -0000 1.32
--- Story.class 15 Apr 2002 15:47:37 -0000 1.33
***************
*** 562,566 ****
$user_id = $story_ary['user_id'];
! if((!$this->perm->have_perm('story,root')) AND
( $user_id != $this->auth->auth['uid'])) {
return false;
--- 562,566 ----
$user_id = $story_ary['user_id'];
! if((!$this->perm->have_perm('story,storyeditor')) AND
( $user_id != $this->auth->auth['uid'])) {
return false;
***************
*** 849,854 ****
$user_id = $this->auth->auth[uid];
! // if you're not root, then you can only view your own stories.
! if (!$this->perm->have_perm("story,root")) {
$q .= "AND '$user_id' = story.user_id
AND '$user_id' = author.author_id ";
--- 849,854 ----
$user_id = $this->auth->auth[uid];
! // if you're not a storyeditor, then you can only view your own stories.
! if (!$this->perm->have_perm("story,storyeditor")) {
$q .= "AND '$user_id' = story.user_id
AND '$user_id' = author.author_id ";
***************
*** 1060,1064 ****
));
// $this->template->set_block("newstory","datetime_row","datetime_rows");
! if (!$this->perm->have_perm("story,root")) {
$this->template->set_var(array(
'TYPE' => "hidden",
--- 1060,1064 ----
));
// $this->template->set_block("newstory","datetime_row","datetime_rows");
! if (!$this->perm->have_perm("story,storyeditor")) {
$this->template->set_var(array(
'TYPE' => "hidden",
***************
*** 1217,1227 ****
// Normal users can't edit another user's stories
! if((!$this->perm->have_perm('story,root')) AND
( $user_id != $this->auth->auth['uid'])) {
return false;
}
! /* if god-level, enable setting of date, otherwise display date */
! if (!$this->perm->have_perm("story,root")) {
$this->template->set_var(array(
'TYPE' => "hidden",
--- 1217,1227 ----
// Normal users can't edit another user's stories
! if((!$this->perm->have_perm('story,storyeditor')) AND
( $user_id != $this->auth->auth['uid'])) {
return false;
}
! /* if storyeditor, enable setting of date, otherwise display date */
! if (!$this->perm->have_perm("story,storyeditor")) {
$this->template->set_var(array(
'TYPE' => "hidden",
***************
*** 1368,1374 ****
}
! $god_edit = true; //god can create as anyone or change story author
!
! if (!$this->perm->have_perm("story,root")) {
$this->template->set_var(array(
'AUTHOR_ID' => $this->auth->auth['uid'],
--- 1368,1372 ----
}
! if (!$this->perm->have_perm("story,storyeditor")) {
$this->template->set_var(array(
'AUTHOR_ID' => $this->auth->auth['uid'],
***************
*** 1384,1390 ****
author_name
FROM psl_author ";
- if( $god_edit == false) {
- $q .= " WHERE author_id = '$user_id' ";
- }
$q .= " ORDER BY author_name ";
--- 1382,1385 ----
|