Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEV-116] Remove authorization based on Members AD group #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ public function beforeRender(Event $event)
$this->customLog('Viewed ' . $_SERVER[ 'REQUEST_URI' ]);

$isAuthorized = [
'canAddEvents' => 0,
'canManageCategories' => 0,
'canManageCommittees' => 0,
'canManageConfigs' => 0,
Expand All @@ -151,10 +150,6 @@ public function beforeRender(Event $event)

if ($this->Auth->user()) {
$authorizations = [
'Members' => [
'canAddEvents',
'canManageOwnEvents'
],
'Calendar Admins' => [
'canManageCategories',
'canManageCommittees',
Expand Down
2 changes: 1 addition & 1 deletion src/Template/Element/Header/default.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</ul>
</li>
<?php if (!($this->request->getParam('controller') == 'Events' && $this->request->getParam('action') == 'add')): ?>
<?php if ($canAddEvents): ?>
<?php if ($authUser): ?>
<li>
<?= $this->Html->link('Submit Event', [
'controller' => 'Events',
Expand Down