public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
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
Commit
[Web] protect /get/identity-provider
6fa1c9f6
data/web/json_api.php | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Diff
diff --git a/data/web/json_api.php b/data/web/json_api.php
index 4e9d2a0e..36b39b0e 100644
--- a/data/web/json_api.php
+++ b/data/web/json_api.php
@@ -1707,8 +1707,13 @@ if (isset($_GET['query'])) {
if ($score)
$score = array("score" => preg_replace("/\s+/", "", $score));
process_get_return($score);
- case "identity_provider":
- process_get_return($iam_settings);
+ break;
+ case "identity-provider":
+ if($_SESSION['mailcow_cc_role'] === 'admin') {
+ process_get_return($iam_settings);
+ } else {
+ process_get_return(null);
+ }
break;
break;
// return no route found if no case is matched
@@ -2086,7 +2091,6 @@ if (isset($_GET['query'])) {
break;
case "cors":
process_edit_return(cors('edit', $attr));
- case "identity_provider":
case "identity-provider":
process_edit_return(identity_provider('edit', $attr));
break;