gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] %s


From: Christian Bayle,,,
Subject: [Gforge-commits] %s
Date: Tue, 18 Jan 2005 22:45:28 +0000

Update of /cvsroot/gforge/gforge/common/mail
In directory db.perdue.net:/tmp/cvs-serv31228/common/mail

Modified Files:
        MailingList.class MailingListFactory.class 
Log Message:
Put userCanAdminMailingLists where I hope it should be


Index: MailingList.class
===================================================================
RCS file: /cvsroot/gforge/gforge/common/mail/MailingList.class,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MailingList.class   13 Jan 2005 10:46:01 -0000      1.5
--- MailingList.class   18 Jan 2005 22:45:25 -0000      1.6
***************
*** 123,127 ****
                if (!$creator_id) {
                        $creator_id=user_getid();
!                       if(! $this->userIsAdmin($this->Group)) {
                                $this->setPermissionDeniedError();
                                return false;
--- 123,127 ----
                if (!$creator_id) {
                        $creator_id=user_getid();
!                       if(! $this->userCanAdminMailingLists($this->Group)) {
                                $this->setPermissionDeniedError();
                                return false;
***************
*** 219,223 ****
                global $Language;
                
!               if(! $this->userIsAdmin($this->Group)) {
                        $this->setPermissionDeniedError();
                        return false;
--- 219,223 ----
                global $Language;
                
!               if(! $this->userCanAdminMailingLists($this->Group)) {
                        $this->setPermissionDeniedError();
                        return false;
***************
*** 341,345 ****
  
        /**
!        * userCanAdminMailingList - use this function to know if the user can 
administrate mailing lists
         *
         * This is a static method. Currently the user must be a project or a 
sitewide admin to administrate the mailing lists
--- 341,345 ----
  
        /**
!        * userCanAdminMailingLists - use this function to know if the user can 
administrate mailing lists
         *
         * This is a static method. Currently the user must be a project or a 
sitewide admin to administrate the mailing lists
***************
*** 348,352 ****
         * @return boolean true if the user can administrate mailing lists
         */
!       function userIsAdmin(& $Group) {
                $perm = & $Group->getPermission(session_get_user());
                if (!$perm || !is_object($perm)) {
--- 348,352 ----
         * @return boolean true if the user can administrate mailing lists
         */
!       function userCanAdminMailingLists(& $Group) {
                $perm = & $Group->getPermission(session_get_user());
                if (!$perm || !is_object($perm)) {

Index: MailingListFactory.class
===================================================================
RCS file: /cvsroot/gforge/gforge/common/mail/MailingListFactory.class,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MailingListFactory.class    13 Jan 2005 10:46:01 -0000      1.3
--- MailingListFactory.class    18 Jan 2005 22:45:25 -0000      1.4
***************
*** 99,103 ****
                if ($perm && is_object($perm) && $perm->isMember()) {
                        $public_flag = MAIL__MAILING_LIST_IS_PRIVATE.', 
'.MAIL__MAILING_LIST_IS_PUBLIC;
!                       if($admin && MailingList::userIsAdmin($this->Group)) {
                                $public_flag .= ', 
'.MAIL__MAILING_LIST_IS_DELETED;
                        }
--- 99,103 ----
                if ($perm && is_object($perm) && $perm->isMember()) {
                        $public_flag = MAIL__MAILING_LIST_IS_PRIVATE.', 
'.MAIL__MAILING_LIST_IS_PUBLIC;
!                       if($admin && 
MailingList::userCanAdminMailingLists($this->Group)) {
                                $public_flag .= ', 
'.MAIL__MAILING_LIST_IS_DELETED;
                        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]