Skip to content

Commit

Permalink
Cleanup after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Stohn authored and Axel Stohn committed Jul 5, 2023
1 parent e2197e4 commit 1318fa4
Showing 1 changed file with 0 additions and 84 deletions.
84 changes: 0 additions & 84 deletions Controller/GrouperGroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ public function beforeFilter()
{
parent::beforeFilter();

// Perform a bit of a sanity check before we get any further
// try {
// $this->verifyRequestedId();
// }
// catch(InvalidArgumentException $e) {
// $this->Flash->set('You are currently not logged into COmanage, please log in.', array('key' => 'error'));
// $this->redirect("/");
// }
// var_dump($this->Session);

$this->Security->unlockedActions = array(
'removeSubscriber',
'addSubscriber',
Expand Down Expand Up @@ -820,80 +810,6 @@ function isAuthorized()
return ($p[$this->action]);
}

public function emaillistsMember()
{
$this->set('title', _txt('pl.grouperlite.title.emaillists-member'));

//Set initial settings for pagination
$scope = [
'userId' => $this->userId,
'page' => ($this->passedArgs['page'] ?? $this->paginate['page']),
'limit' => ($this->passedArgs['limit'] ?? $this->paginate['limit']),
];

if (isset($this->request->data['search'])) {
$searchCriteria = urldecode($this->request->data['search']);
$this->set('searchcriteria', $searchCriteria);

try {
//Add setting for Group Membership
$scope['method'] = 'getSearchedGroups';
$scope['searchcriteria'] = $searchCriteria;
$scope['searchpage'] = 'filteredMemberOfEmails';
$scope['emailonly'] = true;

$data = $this->Paginator->paginate('GrouperGroup', $scope);

$this->set('emailgroups', $data);

} catch (Exception $e) {
CakeLog::write('error', __METHOD__ . ' Search: ' . var_export($e->getMessage(), true));

$this->Flash->set("Your Email Group cannot be found, please try again later.", array('key' => 'error'));
$this->set('emailgroups', array());
return;
}
} else {
try {
//Add setting for Group Membership
$scope['method'] = 'filteredMemberOfEmails';
$scope['emailonly'] = true;

$data = $this->Paginator->paginate('GrouperGroup', $scope);

$this->set('emailgroups', $data);

} catch (Exception $e) {
CakeLog::write('error', __METHOD__ . ' Search: ' . var_export($e->getMessage(), true));

$this->Flash->set("Your Email Group cannot be found, please try again later.", array('key' => 'error'));
$this->set('emailgroups', array());
return;
}
}

$this->set('isuserowner', $this->GrouperGroup->isUserOwner($this->userId));
$this->set('isTemplateUser', $this->GrouperGroup->isTemplateUser($this->userId));
$this->set('isGrouperVisible', $this->GrouperGroup->isGrouperVisible($this->userId));
}

public function emaillistsManage()
{
$this->set('title', _txt('pl.grouperlite.title.emaillists-manage'));
// mock data
$this->set('group', array(
'member' => true,
'name' => 'Email List 1',
'domain' => 'internet2',
'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
'enabled' => 'T'
));

$this->set('isuserowner', $this->GrouperGroup->isUserOwner($this->userId));
$this->set('isTemplateUser', $this->GrouperGroup->isTemplateUser($this->userId));
$this->set('isGrouperVisible', $this->GrouperGroup->isGrouperVisible($this->userId));
}

private function getPersonIdFromUsername($username)
{
$args = array();
Expand Down

0 comments on commit 1318fa4

Please sign in to comment.