noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 13/17: Admin can modify any document + reposi


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 13/17: Admin can modify any document + repository
Date: Wed, 12 Aug 2015 13:23:44 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 40ffc3a965fa64598cb395e1477370914443f72d
Author: Dany De Bontridder <address@hidden>
Date:   Tue Aug 11 11:24:28 2015 +0200

    Admin can modify any document + repository
---
 include/class_user.php |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/class_user.php b/include/class_user.php
index ba102f8..cbe9fdf 100644
--- a/include/class_user.php
+++ b/include/class_user.php
@@ -1121,6 +1121,7 @@ class User
          */
        function can_write_action($dtoc)
        {
+            if ( $this->Admin() == 1 ) return true;
                $profile = $this->get_profile();
                $r = $this->db->get_value(" select count(*) from action_gestion 
where ag_id=$1 and ag_dest in
                                (select p_granted from user_sec_action_profile 
where ua_right='W' and p_id=$2) ", array($dtoc, $profile));
@@ -1136,6 +1137,7 @@ class User
          */
        function can_read_action($dtoc)
        {
+                if ( $this->Admin() == 1 ) return true;
                $profile = $this->get_profile();
                $r = $this->db->get_value(" select count(*) from action_gestion 
where ag_id=$1 and (ag_dest in
                                (select p_granted from user_sec_action_profile 
where p_id=$2) or ag_owner=$3)", array($dtoc, $profile, $this->login));
@@ -1150,6 +1152,7 @@ class User
          */
         function can_write_repo($p_repo)
         {
+            if ( $this->Admin() == 1 ) return true;
             $profile=$this->get_profile();
             $r=$this->db->get_value("select count(*)
                 from profile_sec_repository
@@ -1168,6 +1171,7 @@ class User
          */
         function can_read_repo($p_repo)
         {
+            if ( $this->Admin() == 1 ) return true;
             $profile=$this->get_profile();
             $r=$this->db->get_value("select count(*)
                 from profile_sec_repository



reply via email to

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