NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Trace

data/web/inc/functions.acl.inc.php

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

functions.acl.inc.php on main
Author Date Commit Line Code
André almost 8 years ago c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
1
<?php
Open commit View diff
1 <?php
FreddleSpl0it over 1 year ago 45c13c6

[Web] update user based on template after login

Full commit hash
45c13c687b7c294d24708cd44eb05062d0862d33
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
2
function acl($_action, $_scope = null, $_data = null, $_extra = null) {
Open commit View diff
2 function acl($_action, $_scope = null, $_data = null, $_extra = null) {
André almost 8 years ago c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
3
  global $pdo;
Open commit View diff
3 global $pdo;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
4
  global $lang;
Open commit View diff
4 global $lang;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
5
  $_data_log = $_data;
Open commit View diff
5 $_data_log = $_data;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
6
  switch ($_action) {
Open commit View diff
6 switch ($_action) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
7
    case 'edit':
Open commit View diff
7 case 'edit':
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
8
      switch ($_scope) {
Open commit View diff
8 switch ($_scope) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
9
        case 'user':
Open commit View diff
9 case 'user':
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
10
          if (!is_array($_data['username'])) {
Open commit View diff
10 if (!is_array($_data['username'])) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
11
            $usernames = array();
Open commit View diff
11 $usernames = array();
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
12
            $usernames[] = $_data['username'];
Open commit View diff
12 $usernames[] = $_data['username'];
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
13
          }
Open commit View diff
13 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
14
          else {
Open commit View diff
14 else {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
15
            $usernames = $_data['username'];
Open commit View diff
15 $usernames = $_data['username'];
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
16
          }
Open commit View diff
16 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
17
          foreach ($usernames as $username) {
Open commit View diff
17 foreach ($usernames as $username) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
18
            // Cast to array for single selections
Open commit View diff
18 // Cast to array for single selections
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
19
            $acls = (array)$_data['user_acl'];
Open commit View diff
19 $acls = (array)$_data['user_acl'];
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
20
            // Create associative array from index array
Open commit View diff
20 // Create associative array from index array
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
21
            // All set items are given 1 as value
Open commit View diff
21 // All set items are given 1 as value
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
22
            foreach ($acls as $acl_key => $acl_val) {
Open commit View diff
22 foreach ($acls as $acl_key => $acl_val) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
23
              $acl_post[$acl_val] = 1;
Open commit View diff
23 $acl_post[$acl_val] = 1;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
24
            }
Open commit View diff
24 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
25
            // Users cannot change their own ACL
Open commit View diff
25 // Users cannot change their own ACL
FreddleSpl0it over 1 year ago 8048e0a

[Web] Fix permission exception in IdP actions

Full commit hash
8048e0a53c793ed587cba0b5ee5eadb80efed88e
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
26
            if (!hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $username)
Open commit View diff
26 if (!hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $username)
same change 8048e0a

[Web] Fix permission exception in IdP actions

Full commit hash
8048e0a53c793ed587cba0b5ee5eadb80efed88e
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
27
              || ($_SESSION['mailcow_cc_role'] != 'admin' && $_SESSION['mailcow_cc_role'] != 'domainadmin' && $_SESSION['access_all_exception'] != '1')) {
Open commit View diff
27 || ($_SESSION['mailcow_cc_role'] != 'admin' && $_SESSION['mailcow_cc_role'] != 'domainadmin' && $_SESSION['access_all_exception'] != '1')) {
André almost 8 years ago c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
28
              $_SESSION['return'][] = array(
Open commit View diff
28 $_SESSION['return'][] = array(
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
29
                'type' => 'danger',
Open commit View diff
29 'type' => 'danger',
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
30
                'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
Open commit View diff
30 'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
31
                'msg' => 'access_denied'
Open commit View diff
31 'msg' => 'access_denied'
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
32
              );
Open commit View diff
32 );
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
33
              continue;
Open commit View diff
33 continue;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
34
            }
Open commit View diff
34 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
35
            // Read all available acl options by calling acl(get)
Open commit View diff
35 // Read all available acl options by calling acl(get)
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
36
            // Set all available acl options we cannot find in the post data to 0, else 1
Open commit View diff
36 // Set all available acl options we cannot find in the post data to 0, else 1
FreddleSpl0it over 1 year ago 45c13c6

[Web] update user based on template after login

Full commit hash
45c13c687b7c294d24708cd44eb05062d0862d33
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
37
            $is_now = acl('get', 'user', $username, $_extra);
Open commit View diff
37 $is_now = acl('get', 'user', $username, $_extra);
André almost 8 years ago c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
38
            if (!empty($is_now)) {
Open commit View diff
38 if (!empty($is_now)) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
39
              foreach ($is_now as $acl_now_name => $acl_now_val) {
Open commit View diff
39 foreach ($is_now as $acl_now_name => $acl_now_val) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
40
                $set_acls[$acl_now_name] = (isset($acl_post[$acl_now_name])) ? 1 : 0;
Open commit View diff
40 $set_acls[$acl_now_name] = (isset($acl_post[$acl_now_name])) ? 1 : 0;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
41
              }
Open commit View diff
41 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
42
            }
Open commit View diff
42 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
43
            else {
Open commit View diff
43 else {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
44
              $_SESSION['return'][] = array(
Open commit View diff
44 $_SESSION['return'][] = array(
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
45
                'type' => 'danger',
Open commit View diff
45 'type' => 'danger',
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
46
                'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
Open commit View diff
46 'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
47
                'msg' => 'Cannot determine current ACL'
Open commit View diff
47 'msg' => 'Cannot determine current ACL'
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
48
              );
Open commit View diff
48 );
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
49
              continue;
Open commit View diff
49 continue;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
50
            }
Open commit View diff
50 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
51
            foreach ($set_acls as $set_acl_key => $set_acl_val) {
Open commit View diff
51 foreach ($set_acls as $set_acl_key => $set_acl_val) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
52
              $stmt = $pdo->prepare("UPDATE `user_acl` SET " . $set_acl_key . " = " . intval($set_acl_val) . "
Open commit View diff
52 $stmt = $pdo->prepare("UPDATE `user_acl` SET " . $set_acl_key . " = " . intval($set_acl_val) . "
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
53
                WHERE `username` = :username");
Open commit View diff
53 WHERE `username` = :username");
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
54
              $stmt->execute(array(
Open commit View diff
54 $stmt->execute(array(
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
55
                ':username' => $username,
Open commit View diff
55 ':username' => $username,
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
56
              ));
Open commit View diff
56 ));
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
57
            }
Open commit View diff
57 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
58
            $_SESSION['return'][] = array(
Open commit View diff
58 $_SESSION['return'][] = array(
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
59
              'type' => 'success',
Open commit View diff
59 'type' => 'success',
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
60
              'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
Open commit View diff
60 'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
61
              'msg' => array('acl_saved', $username)
Open commit View diff
61 'msg' => array('acl_saved', $username)
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
62
            );
Open commit View diff
62 );
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
63
          }
Open commit View diff
63 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
64
        break;
Open commit View diff
64 break;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
65
        case 'domainadmin':
Open commit View diff
65 case 'domainadmin':
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
66
          if ($_SESSION['mailcow_cc_role'] != 'admin') {
Open commit View diff
66 if ($_SESSION['mailcow_cc_role'] != 'admin') {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
67
            $_SESSION['return'][] = array(
Open commit View diff
67 $_SESSION['return'][] = array(
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
68
              'type' => 'danger',
Open commit View diff
68 'type' => 'danger',
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
69
              'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
Open commit View diff
69 'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
70
              'msg' => 'access_denied'
Open commit View diff
70 'msg' => 'access_denied'
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
71
            );
Open commit View diff
71 );
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
72
            return false;
Open commit View diff
72 return false;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
73
          }
Open commit View diff
73 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
74
          if (!is_array($_data['username'])) {
Open commit View diff
74 if (!is_array($_data['username'])) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
75
            $usernames = array();
Open commit View diff
75 $usernames = array();
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
76
            $usernames[] = $_data['username'];
Open commit View diff
76 $usernames[] = $_data['username'];
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
77
          }
Open commit View diff
77 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
78
          else {
Open commit View diff
78 else {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
79
            $usernames = $_data['username'];
Open commit View diff
79 $usernames = $_data['username'];
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
80
          }
Open commit View diff
80 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
81
          foreach ($usernames as $username) {
Open commit View diff
81 foreach ($usernames as $username) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
82
            // Cast to array for single selections
Open commit View diff
82 // Cast to array for single selections
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
83
            $acls = (array)$_data['da_acl'];
Open commit View diff
83 $acls = (array)$_data['da_acl'];
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
84
            // Create associative array from index array
Open commit View diff
84 // Create associative array from index array
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
85
            // All set items are given 1 as value
Open commit View diff
85 // All set items are given 1 as value
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
86
            foreach ($acls as $acl_key => $acl_val) {
Open commit View diff
86 foreach ($acls as $acl_key => $acl_val) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
87
              $acl_post[$acl_val] = 1;
Open commit View diff
87 $acl_post[$acl_val] = 1;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
88
            }
Open commit View diff
88 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
89
            // Users cannot change their own ACL
Open commit View diff
89 // Users cannot change their own ACL
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
90
            if ($_SESSION['mailcow_cc_role'] != 'admin') {
Open commit View diff
90 if ($_SESSION['mailcow_cc_role'] != 'admin') {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
91
              $_SESSION['return'][] = array(
Open commit View diff
91 $_SESSION['return'][] = array(
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
92
                'type' => 'danger',
Open commit View diff
92 'type' => 'danger',
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
93
                'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
Open commit View diff
93 'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
94
                'msg' => 'access_denied'
Open commit View diff
94 'msg' => 'access_denied'
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
95
              );
Open commit View diff
95 );
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
96
              continue;
Open commit View diff
96 continue;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
97
            }
Open commit View diff
97 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
98
            // Read all available acl options by calling acl(get)
Open commit View diff
98 // Read all available acl options by calling acl(get)
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
99
            // Set all available acl options we cannot find in the post data to 0, else 1
Open commit View diff
99 // Set all available acl options we cannot find in the post data to 0, else 1
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
100
            $is_now = acl('get', 'domainadmin', $username);
Open commit View diff
100 $is_now = acl('get', 'domainadmin', $username);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
101
            if (!empty($is_now)) {
Open commit View diff
101 if (!empty($is_now)) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
102
              foreach ($is_now as $acl_now_name => $acl_now_val) {
Open commit View diff
102 foreach ($is_now as $acl_now_name => $acl_now_val) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
103
                $set_acls[$acl_now_name] = (isset($acl_post[$acl_now_name])) ? 1 : 0;
Open commit View diff
103 $set_acls[$acl_now_name] = (isset($acl_post[$acl_now_name])) ? 1 : 0;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
104
              }
Open commit View diff
104 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
105
            }
Open commit View diff
105 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
106
            else {
Open commit View diff
106 else {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
107
              $_SESSION['return'][] = array(
Open commit View diff
107 $_SESSION['return'][] = array(
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
108
                'type' => 'danger',
Open commit View diff
108 'type' => 'danger',
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
109
                'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
Open commit View diff
109 'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
110
                'msg' => 'Cannot determine current ACL'
Open commit View diff
110 'msg' => 'Cannot determine current ACL'
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
111
              );
Open commit View diff
111 );
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
112
              continue;
Open commit View diff
112 continue;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
113
            }
Open commit View diff
113 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
114
            foreach ($set_acls as $set_acl_key => $set_acl_val) {
Open commit View diff
114 foreach ($set_acls as $set_acl_key => $set_acl_val) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
115
              $stmt = $pdo->prepare("UPDATE `da_acl` SET " . $set_acl_key . " = " . intval($set_acl_val) . "
Open commit View diff
115 $stmt = $pdo->prepare("UPDATE `da_acl` SET " . $set_acl_key . " = " . intval($set_acl_val) . "
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
116
                WHERE `username` = :username");
Open commit View diff
116 WHERE `username` = :username");
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
117
              $stmt->execute(array(
Open commit View diff
117 $stmt->execute(array(
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
118
                ':username' => $username,
Open commit View diff
118 ':username' => $username,
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
119
              ));
Open commit View diff
119 ));
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
120
            }
Open commit View diff
120 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
121
            $_SESSION['return'][] = array(
Open commit View diff
121 $_SESSION['return'][] = array(
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
122
              'type' => 'success',
Open commit View diff
122 'type' => 'success',
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
123
              'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
Open commit View diff
123 'log' => array(__FUNCTION__, $_action, $_scope, $_data_log),
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
124
              'msg' => array('acl_saved', $username)
Open commit View diff
124 'msg' => array('acl_saved', $username)
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
125
            );
Open commit View diff
125 );
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
126
          }
Open commit View diff
126 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
127
        break;
Open commit View diff
127 break;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
128
      }
Open commit View diff
128 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
129
    break;
Open commit View diff
129 break;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
130
    case 'get':
Open commit View diff
130 case 'get':
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
131
      switch ($_scope) {
Open commit View diff
131 switch ($_scope) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
132
        case 'user':
Open commit View diff
132 case 'user':
FreddleSpl0it over 1 year ago 8048e0a

[Web] Fix permission exception in IdP actions

Full commit hash
8048e0a53c793ed587cba0b5ee5eadb80efed88e
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
133
          if (!hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $_data)) {
Open commit View diff
133 if (!hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $_data)) {
André almost 8 years ago c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
134
            return false;
Open commit View diff
134 return false;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
135
          }
Open commit View diff
135 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
136
          $stmt = $pdo->prepare("SELECT * FROM `user_acl` WHERE `username` = :username");
Open commit View diff
136 $stmt = $pdo->prepare("SELECT * FROM `user_acl` WHERE `username` = :username");
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
137
          $stmt->execute(array(':username' => $_data));
Open commit View diff
137 $stmt->execute(array(':username' => $_data));
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
138
          $data = $stmt->fetch(PDO::FETCH_ASSOC);
Open commit View diff
138 $data = $stmt->fetch(PDO::FETCH_ASSOC);
andryyy over 6 years ago ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
139
          if ($_SESSION['mailcow_cc_role'] == 'domainadmin') {
Open commit View diff
139 if ($_SESSION['mailcow_cc_role'] == 'domainadmin') {
same change ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
140
            // Domain admins cannot see, add or remove user ACLs they don't have access to by themselves
Open commit View diff
140 // Domain admins cannot see, add or remove user ACLs they don't have access to by themselves
same change ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
141
            // Editing a user will use acl("get", "user") to determine granted ACLs and therefore block unallowed access escalation via form editing
Open commit View diff
141 // Editing a user will use acl("get", "user") to determine granted ACLs and therefore block unallowed access escalation via form editing
same change ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
142
            $self_da_acl = acl('get', 'domainadmin', $_SESSION['mailcow_cc_username']);
Open commit View diff
142 $self_da_acl = acl('get', 'domainadmin', $_SESSION['mailcow_cc_username']);
same change ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
143
            foreach ($self_da_acl as $self_da_acl_key => $self_da_acl_val) {
Open commit View diff
143 foreach ($self_da_acl as $self_da_acl_key => $self_da_acl_val) {
same change ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
144
              if ($self_da_acl_val == 0) {
Open commit View diff
144 if ($self_da_acl_val == 0) {
same change ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
145
                unset($data[$self_da_acl_key]);
Open commit View diff
145 unset($data[$self_da_acl_key]);
same change ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
146
              }
Open commit View diff
146 }
same change ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
147
            }
Open commit View diff
147 }
same change ecebfe1

[Web] Remove External as standard subfolder for sync jobs

Full commit hash
ecebfe15dfa6079c3e1e8af05945e4d86ef5b8db
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
148
          }
Open commit View diff
148 }
André almost 8 years ago c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
149
          if (!empty($data)) {
Open commit View diff
149 if (!empty($data)) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
150
            unset($data['username']);
Open commit View diff
150 unset($data['username']);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
151
            return $data;
Open commit View diff
151 return $data;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
152
          }
Open commit View diff
152 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
153
          else {
Open commit View diff
153 else {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
154
            return false;
Open commit View diff
154 return false;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
155
          }
Open commit View diff
155 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
156
        break;
Open commit View diff
156 break;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
157
        case 'domainadmin':
Open commit View diff
157 case 'domainadmin':
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
158
          if ($_SESSION['mailcow_cc_role'] != 'admin' && $_SESSION['mailcow_cc_role'] != 'domainadmin') {
Open commit View diff
158 if ($_SESSION['mailcow_cc_role'] != 'admin' && $_SESSION['mailcow_cc_role'] != 'domainadmin') {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
159
            return false;
Open commit View diff
159 return false;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
160
          }
Open commit View diff
160 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
161
          if ($_SESSION['mailcow_cc_role'] == 'domainadmin' && $_SESSION['mailcow_cc_username'] != $_data) {
Open commit View diff
161 if ($_SESSION['mailcow_cc_role'] == 'domainadmin' && $_SESSION['mailcow_cc_username'] != $_data) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
162
            return false;
Open commit View diff
162 return false;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
163
          }
Open commit View diff
163 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
164
          $stmt = $pdo->prepare("SELECT * FROM `da_acl` WHERE `username` = :username");
Open commit View diff
164 $stmt = $pdo->prepare("SELECT * FROM `da_acl` WHERE `username` = :username");
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
165
          $stmt->execute(array(':username' => $_data));
Open commit View diff
165 $stmt->execute(array(':username' => $_data));
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
166
          $data = $stmt->fetch(PDO::FETCH_ASSOC);
Open commit View diff
166 $data = $stmt->fetch(PDO::FETCH_ASSOC);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
167
          if (!empty($data)) {
Open commit View diff
167 if (!empty($data)) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
168
            unset($data['username']);
Open commit View diff
168 unset($data['username']);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
169
            return $data;
Open commit View diff
169 return $data;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
170
          }
Open commit View diff
170 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
171
          else {
Open commit View diff
171 else {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
172
            return false;
Open commit View diff
172 return false;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
173
          }
Open commit View diff
173 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
174
        break;
Open commit View diff
174 break;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
175
      }
Open commit View diff
175 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
176
    break;
Open commit View diff
176 break;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
177
    case 'to_session':
Open commit View diff
177 case 'to_session':
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
178
      if (!isset($_SESSION['mailcow_cc_role'])) {
Open commit View diff
178 if (!isset($_SESSION['mailcow_cc_role'])) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
179
        return false;
Open commit View diff
179 return false;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
180
      }
Open commit View diff
180 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
181
      unset($_SESSION['acl']);
Open commit View diff
181 unset($_SESSION['acl']);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
182
      $username = strtolower(trim($_SESSION['mailcow_cc_username']));
Open commit View diff
182 $username = strtolower(trim($_SESSION['mailcow_cc_username']));
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
183
      // Admins get access to all modules
Open commit View diff
183 // Admins get access to all modules
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
184
      if ($_SESSION['mailcow_cc_role'] == 'admin' ||
Open commit View diff
184 if ($_SESSION['mailcow_cc_role'] == 'admin' ||
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
185
        (isset($_SESSION["dual-login"]["role"]) && $_SESSION["dual-login"]["role"] == 'admin')) {
Open commit View diff
185 (isset($_SESSION["dual-login"]["role"]) && $_SESSION["dual-login"]["role"] == 'admin')) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
186
        $stmt = $pdo->query("SHOW COLUMNS FROM `user_acl` WHERE `Field` != 'username';");
Open commit View diff
186 $stmt = $pdo->query("SHOW COLUMNS FROM `user_acl` WHERE `Field` != 'username';");
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
187
        $acl_all = $stmt->fetchAll(PDO::FETCH_ASSOC);
Open commit View diff
187 $acl_all = $stmt->fetchAll(PDO::FETCH_ASSOC);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
188
        while ($row = array_shift($acl_all)) {
Open commit View diff
188 while ($row = array_shift($acl_all)) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
189
          $acl['acl'][$row['Field']] = 1;
Open commit View diff
189 $acl['acl'][$row['Field']] = 1;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
190
        }
Open commit View diff
190 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
191
        $stmt = $pdo->query("SHOW COLUMNS FROM `da_acl` WHERE `Field` != 'username';");
Open commit View diff
191 $stmt = $pdo->query("SHOW COLUMNS FROM `da_acl` WHERE `Field` != 'username';");
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
192
        $acl_all = $stmt->fetchAll(PDO::FETCH_ASSOC);
Open commit View diff
192 $acl_all = $stmt->fetchAll(PDO::FETCH_ASSOC);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
193
        while ($row = array_shift($acl_all)) {
Open commit View diff
193 while ($row = array_shift($acl_all)) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
194
          $acl['acl'][$row['Field']] = 1;
Open commit View diff
194 $acl['acl'][$row['Field']] = 1;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
195
        }
Open commit View diff
195 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
196
      }
Open commit View diff
196 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
197
      elseif ($_SESSION['mailcow_cc_role'] == 'domainadmin' ||
Open commit View diff
197 elseif ($_SESSION['mailcow_cc_role'] == 'domainadmin' ||
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
198
        (isset($_SESSION["dual-login"]["role"]) && $_SESSION["dual-login"]["role"] == 'domainadmin')) {
Open commit View diff
198 (isset($_SESSION["dual-login"]["role"]) && $_SESSION["dual-login"]["role"] == 'domainadmin')) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
199
        // Read all exting user_acl modules and set to 1
Open commit View diff
199 // Read all exting user_acl modules and set to 1
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
200
        $stmt = $pdo->query("SHOW COLUMNS FROM `user_acl` WHERE `Field` != 'username';");
Open commit View diff
200 $stmt = $pdo->query("SHOW COLUMNS FROM `user_acl` WHERE `Field` != 'username';");
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
201
        $acl_all = $stmt->fetchAll(PDO::FETCH_ASSOC);
Open commit View diff
201 $acl_all = $stmt->fetchAll(PDO::FETCH_ASSOC);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
202
        while ($row = array_shift($acl_all)) {
Open commit View diff
202 while ($row = array_shift($acl_all)) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
203
          $acl['acl'][$row['Field']] = 1;
Open commit View diff
203 $acl['acl'][$row['Field']] = 1;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
204
        }
Open commit View diff
204 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
205
        // Read da_acl rules for current user, OVERWRITE overlapping modules
Open commit View diff
205 // Read da_acl rules for current user, OVERWRITE overlapping modules
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
206
        // This prevents access to a users sync jobs, when a domain admins was not given access to sync jobs
Open commit View diff
206 // This prevents access to a users sync jobs, when a domain admins was not given access to sync jobs
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
207
        $stmt = $pdo->prepare("SELECT * FROM `da_acl` WHERE `username` = :username");
Open commit View diff
207 $stmt = $pdo->prepare("SELECT * FROM `da_acl` WHERE `username` = :username");
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
208
        $stmt->execute(array(':username' => (isset($_SESSION["dual-login"]["username"])) ? $_SESSION["dual-login"]["username"] : $username));
Open commit View diff
208 $stmt->execute(array(':username' => (isset($_SESSION["dual-login"]["username"])) ? $_SESSION["dual-login"]["username"] : $username));
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
209
        $acl_user = $stmt->fetch(PDO::FETCH_ASSOC);
Open commit View diff
209 $acl_user = $stmt->fetch(PDO::FETCH_ASSOC);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
210
        foreach ($acl_user as $acl_user_key => $acl_user_val) {
Open commit View diff
210 foreach ($acl_user as $acl_user_key => $acl_user_val) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
211
          $acl['acl'][$acl_user_key] = $acl_user_val;
Open commit View diff
211 $acl['acl'][$acl_user_key] = $acl_user_val;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
212
        }
Open commit View diff
212 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
213
        unset($acl['acl']['username']);
Open commit View diff
213 unset($acl['acl']['username']);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
214
      }
Open commit View diff
214 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
215
      elseif ($_SESSION['mailcow_cc_role'] == 'user') {
Open commit View diff
215 elseif ($_SESSION['mailcow_cc_role'] == 'user') {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
216
        $stmt = $pdo->prepare("SELECT * FROM `user_acl` WHERE `username` = :username");
Open commit View diff
216 $stmt = $pdo->prepare("SELECT * FROM `user_acl` WHERE `username` = :username");
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
217
        $stmt->execute(array(':username' => $username));
Open commit View diff
217 $stmt->execute(array(':username' => $username));
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
218
        $acl['acl'] = $stmt->fetch(PDO::FETCH_ASSOC);
Open commit View diff
218 $acl['acl'] = $stmt->fetch(PDO::FETCH_ASSOC);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
219
        unset($acl['acl']['username']);
Open commit View diff
219 unset($acl['acl']['username']);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
220
      }
Open commit View diff
220 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
221
      if (!empty($acl)) {
Open commit View diff
221 if (!empty($acl)) {
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
222
        $_SESSION = array_merge($_SESSION, $acl);
Open commit View diff
222 $_SESSION = array_merge($_SESSION, $acl);
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
223
      }
Open commit View diff
223 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
224
    break;
Open commit View diff
224 break;
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
225
  }
Open commit View diff
225 }
same change c9554ca

[Compose] Update watchdog image

Full commit hash
c9554ca02291e64e56a786217de8d4b34b25544d
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
226
}
Open commit View diff
226 }