All Data Structures Functions Variables Pages
MissionsUserWalkthroughTest.php
1 <?php
2  /*********************************************************************************
3  * Zurmo is a customer relationship management program developed by
4  * Zurmo, Inc. Copyright (C) 2017 Zurmo Inc.
5  *
6  * Zurmo is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  *
13  * Zurmo is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  *
23  * You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive
24  * Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com.
25  *
26  * The interactive user interfaces in original and modified versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  *
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the Zurmo
32  * logo and Zurmo copyright notice. If the display of the logo is not reasonably
33  * feasible for technical reasons, the Appropriate Legal Notices must display the words
34  * "Copyright Zurmo Inc. 2017. All rights reserved".
35  ********************************************************************************/
36 
42  {
43  public static function setUpBeforeClass()
44  {
45  parent::setUpBeforeClass();
46  SecurityTestHelper::createSuperAdmin();
47  $super = User::getByUsername('super');
48  Yii::app()->user->userModel = $super;
50 
51  //create everyone group
52  $everyoneGroup = Group::getByName(Group::EVERYONE_GROUP_NAME);
53  $everyoneGroup->save();
54 
55  //Create test users
56  $steven = UserTestHelper::createBasicUser('steven');
57  $steven->primaryEmail->emailAddress = 'steven@testzurmo.com';
58  //Steven has turned off notifications
59  NotificationTestHelper::setNotificationSettingsForUser($steven, 'NewMission', false, false);
60  NotificationTestHelper::setNotificationSettingsForUser($steven, 'MissionStatusChange', false, false);
61  NotificationTestHelper::setNotificationSettingsForUser($steven, 'MissionNewComment', false, false);
62  $sally = UserTestHelper::createBasicUser('sally');
63  $sally->primaryEmail->emailAddress = 'sally@testzurmo.com';
64  $mary = UserTestHelper::createBasicUser('mary');
65  $mary->primaryEmail->emailAddress = 'mary@testzurmo.com';
66 
67  //give 3 users access, create, delete for mission rights.
68  $steven->setRight('MissionsModule', MissionsModule::RIGHT_ACCESS_MISSIONS);
69  $steven->setRight('MissionsModule', MissionsModule::RIGHT_CREATE_MISSIONS);
70  $steven->setRight('MissionsModule', MissionsModule::RIGHT_DELETE_MISSIONS);
71  $saved = $steven->save();
72  if (!$saved)
73  {
74  throw new NotSupportedException();
75  }
76  $sally->setRight('MissionsModule', MissionsModule::RIGHT_ACCESS_MISSIONS);
77  $sally->setRight('MissionsModule', MissionsModule::RIGHT_CREATE_MISSIONS);
78  $sally->setRight('MissionsModule', MissionsModule::RIGHT_DELETE_MISSIONS);
79  $saved = $sally->save();
80  if (!$saved)
81  {
82  throw new NotSupportedException();
83  }
84  $mary->setRight('MissionsModule', MissionsModule::RIGHT_ACCESS_MISSIONS);
85  $mary->setRight('MissionsModule', MissionsModule::RIGHT_CREATE_MISSIONS);
86  $mary->setRight('MissionsModule', MissionsModule::RIGHT_DELETE_MISSIONS);
87  $saved = $mary->save();
88  if (!$saved)
89  {
90  throw new NotSupportedException();
91  }
92  }
93 
94  public function testSuperUserAllSimpleControllerActions()
95  {
96  $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super');
97 
98  //Test all default controller actions that do not require any POST/GET variables to be passed.
99  //This does not include portlet controller actions.
100  $this->runControllerWithNoExceptionsAndGetContent('missions/default');
101  $this->runControllerWithNoExceptionsAndGetContent('missions/default/index');
102  $this->runControllerWithNoExceptionsAndGetContent('missions/default/list');
103  $this->runControllerWithNoExceptionsAndGetContent('missions/default/create');
104  }
105 
109  public function testSuperUserCreateMission()
110  {
111  $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super');
112  $steven = User::getByUsername('steven');
113  $sally = User::getByUsername('sally');
114  $mary = User::getByUsername('mary');
115 
116  $this->assertEquals(0, Yii::app()->emailHelper->getQueuedCount());
117  $this->assertEquals(0, Yii::app()->emailHelper->getSentCount());
118  $this->assertEquals(0, Notification::getCount());
119 
120  $missions = Mission::getAll();
121  $this->assertEquals(0, count($missions));
122  $this->setPostArray(array('Mission' => array('description' => 'TestDescription',
123  'reward' => 'Reward')));
124  $this->runControllerWithRedirectExceptionAndGetContent('missions/default/create');
125 
126  //Confirm mission saved.
127  $missions = Mission::getAll();
128  $this->assertEquals(1, count($missions));
129  $this->assertEquals('TestDescription', $missions[0]->description);
130  $this->assertEquals(Mission::STATUS_AVAILABLE, $missions[0]->status);
131 
132  //Confirm everyone has read/write
133  $everyoneGroup = Group::getByName(Group::EVERYONE_GROUP_NAME);
134  $explicitReadWriteModelPermissions = ExplicitReadWriteModelPermissionsUtil::
135  makeBySecurableItem($missions[0]);
136  $readWritePermitables = $explicitReadWriteModelPermissions->getReadWritePermitables();
137  $this->assertEquals(1, count($readWritePermitables));
138  $this->assertTrue(isset($readWritePermitables[$everyoneGroup->getClassId('Permitable')]));
139 
140  //Confirm email was sent
141  $this->assertEquals(2, Yii::app()->emailHelper->getQueuedCount());
142  $this->assertEquals(0, Yii::app()->emailHelper->getSentCount());
143  $emailMessages = EmailMessage::getAll();
144  //Dont send message to super neither to steven (he has turned off)
145  $recipents = array();
146  $recipents[] = strval($emailMessages[0]->recipients[0]);
147  $recipents[] = strval($emailMessages[1]->recipients[0]);
148  $this->assertEquals (1, count($emailMessages[0]->recipients));
149  $this->assertEquals (1, count($emailMessages[1]->recipients));
150  $this->assertNotContains(strval($super->primaryEmail), $recipents);
151  $this->assertNotContains(strval($steven->primaryEmail), $recipents);
152  $this->assertContains (strval($mary->primaryEmail), $recipents);
153  $this->assertContains (strval($sally->primaryEmail), $recipents);
154  //Confirm notifications where created
155  $this->assertEquals(2, Notification::getCount());
156  }
157 
162  {
163  if (!SECURITY_OPTIMIZED) //bug prevents this from running correctly
164  {
165  return;
166  }
168 
169  $missions = Mission::getAll();
170  $this->assertEquals(1, count($missions));
171  $this->assertEquals(0, $missions[0]->comments->count());
172  $this->assertEquals(2, Yii::app()->emailHelper->getQueuedCount());
173  $this->assertEquals(0, Yii::app()->emailHelper->getSentCount());
174  $this->assertEquals(2, Notification::getCount());
175  $oldStamp = $missions[0]->latestDateTime;
176 
177  //Validate comment
178  $this->setGetArray(array('relatedModelId' => $missions[0]->id,
179  'relatedModelClassName' => 'Mission',
180  'relatedModelRelationName' => 'comments',
181  'redirectUrl' => 'someRedirect'));
182  $this->setPostArray(array('ajax' => 'comment-inline-edit-form',
183  'Comment' => array('description' => 'a ValidComment Name')));
184 
185  $content = $this->runControllerWithExitExceptionAndGetContent('comments/default/inlineCreateSave');
186  $this->assertEquals('[]', $content);
187 
188  //Now save that comment.
189  sleep(2); //to force some time to pass.
190  $this->setGetArray(array('relatedModelId' => $missions[0]->id,
191  'relatedModelClassName' => 'Mission',
192  'relatedModelRelationName' => 'comments',
193  'redirectUrl' => 'someRedirect'));
194  $this->setPostArray(array('Comment' => array('description' => 'a ValidComment Name')));
195  $content = $this->runControllerWithRedirectExceptionAndGetContent('comments/default/inlineCreateSave');
196  $id = $missions[0]->id;
197  $missions[0]->forget();
198  $mission = Mission::getById($id);
199  $this->assertEquals(1, $mission->comments->count());
200 
201  //should update latest activity stamp
202  $this->assertNotEquals($oldStamp, $missions[0]->latestDateTime);
203  $newStamp = $missions[0]->latestDateTime;
204  sleep(2); // Sleeps are bad in tests, but I need some time to pass
205 
206  //Mary should be able to add a comment because everyone can do this on a mission
207  $mary = $this->logoutCurrentUserLoginNewUserAndGetByUsername('mary');
208  $this->setGetArray(array('relatedModelId' => $missions[0]->id,
209  'relatedModelClassName' => 'Mission',
210  'relatedModelRelationName' => 'comments',
211  'redirectUrl' => 'someRedirect'));
212  $this->setPostArray(array('Comment' => array('description' => 'a ValidComment Name 2')));
213  $content = $this->runControllerWithRedirectExceptionAndGetContent('comments/default/inlineCreateSave');
214  $id = $missions[0]->id;
215  $missions[0]->forget();
216  $mission = Mission::getById($id);
217  $this->assertEquals(2, $mission->comments->count());
218  $this->assertNotEquals($newStamp, $mission->latestDateTime);
219  }
220 
225  {
226  if (!SECURITY_OPTIMIZED) //bug prevents this from running correctly
227  {
228  return;
229  }
230  //todo; we stll need to test that other users can get to the missions.
231  $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super');
232  $mary = User::getByUsername('mary');
233  $missions = Mission::getAll();
234  $this->assertEquals(1, count($missions));
235  $this->assertEquals(2, $missions[0]->comments->count());
236 
237  //Mary should not be able to edit the mission
238  $mary = $this->logoutCurrentUserLoginNewUserAndGetByUsername('mary');
239  $this->setGetArray(array('id' => $missions[0]->id));
240  $this->runControllerWithExitExceptionAndGetContent('missions/default/edit');
241 
242  //new test - mary can delete a comment she wrote
243  $maryCommentId = $missions[0]->comments->offsetGet(1)->id;
244  $this->assertEquals($missions[0]->comments->offsetGet(1)->createdByUser->id, $mary->id);
245  $superCommentId = $missions[0]->comments->offsetGet(0)->id;
246  $this->assertEquals($missions[0]->comments->offsetGet(0)->createdByUser->id, $super->id);
247  $this->setGetArray(array('relatedModelId' => $missions[0]->id,
248  'relatedModelClassName' => 'Mission',
249  'relatedModelRelationName' => 'comments',
250  'id' => $maryCommentId));
251  $this->runControllerWithNoExceptionsAndGetContent('comments/default/deleteViaAjax', true);
252  $missionId = $missions[0]->id;
253  $missions[0]->forget();
254  $mission = Mission::getById($missionId);
255  $this->assertEquals(1, $mission->comments->count());
256 
257  //new test - mary cannot delete a comment she did not write.
258  $this->setGetArray(array('relatedModelId' => $missions[0]->id,
259  'relatedModelClassName' => 'Mission',
260  'relatedModelRelationName' => 'comments',
261  'id' => $superCommentId));
262  $this->runControllerShouldResultInAjaxAccessFailureAndGetContent('comments/default/deleteViaAjax');
263  $missionId = $missions[0]->id;
264  $missions[0]->forget();
265  $mission = Mission::getById($missionId);
266  $this->assertEquals(1, $mission->comments->count());
267  $this->assertEquals(1, $mission->comments->count());
268 
269  $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super');
270  $this->assertTrue($mission->owner->isSame($super));
271 
272  //new test , super can view and edit the mission
273  $this->setGetArray(array('id' => $mission->id));
274  $this->runControllerWithNoExceptionsAndGetContent('missions/default/details');
275  $this->runControllerWithNoExceptionsAndGetContent('missions/default/edit');
276 
277  //new test , super can delete the mission
278  $this->setGetArray(array('id' => $mission->id));
279  $this->runControllerWithRedirectExceptionAndGetContent('missions/default/delete');
280 
281  $missions = Mission::getAll();
282  $this->assertEquals(0, count($missions));
283  }
284 
288  public function testListViewFiltering()
289  {
290  if (!SECURITY_OPTIMIZED) //bug prevents this from running correctly
291  {
292  return;
293  }
294  $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super');
295  $content = $this->runControllerWithNoExceptionsAndGetContent('missions/default/list');
296  $this->assertContains('Missions', $content);
297  $this->setGetArray(array(
298  'type' => MissionsListConfigurationForm::LIST_TYPE_CREATED));
299  $content = $this->runControllerWithNoExceptionsAndGetContent('missions/default/list');
300  $this->assertContains('Missions', $content);
301  $this->setGetArray(array(
302  'type' => MissionsListConfigurationForm::LIST_TYPE_AVAILABLE));
303  $content = $this->runControllerWithNoExceptionsAndGetContent('missions/default/list');
304  $this->assertContains('Missions', $content);
305  $this->setGetArray(array(
306  'type' => MissionsListConfigurationForm::LIST_TYPE_MINE_TAKEN_BUT_NOT_ACCEPTED));
307  $content = $this->runControllerWithNoExceptionsAndGetContent('missions/default/list');
308  $this->assertContains('Missions', $content);
309  }
310 
315  {
316  if (!SECURITY_OPTIMIZED) //bug prevents this from running correctly
317  {
318  return;
319  }
320  $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super');
321  $missions = Mission::getAll();
322  $this->assertEquals(0, count($missions));
323 
324  //Create a new mission
325  $this->setPostArray(array('Mission' => array('description' => 'TestDescription',
326  'reward' => 'Reward')));
327  $this->runControllerWithRedirectExceptionAndGetContent('missions/default/create');
328  $missions = Mission::getAll();
329  $this->assertEquals(1, count($missions));
330 
331  $this->setGetArray(array('relatedModelId' => $missions[0]->id, 'relatedModelClassName' => 'Mission',
332  'relatedModelRelationName' => 'comments'));
333  $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super');
334  $content = $this->runControllerWithNoExceptionsAndGetContent('comments/default/ajaxListForRelatedModel');
335  }
336 
340  public function testAjaxChangeStatus()
341  {
342  $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super');
343  $missions = Mission::getAll();
344  $this->assertEquals(1, count($missions));
345  $missions[0]->delete();
346 
347  //Create a new mission
348  $this->setPostArray(array('Mission' => array('description' => 'TestDescription',
349  'reward' => 'Reward')));
350  $this->runControllerWithRedirectExceptionAndGetContent('missions/default/create');
351 
352  //Confirm mission saved.
353  $missions = Mission::getAll();
354  $this->assertEquals(1, count($missions));
355  $this->assertEquals(Mission::STATUS_AVAILABLE, $missions[0]->status);
356  $this->assertTrue($missions[0]->takenByUser->id < 0);
357 
358  //change status to taken
359  $mary = $this->logoutCurrentUserLoginNewUserAndGetByUsername('mary');
360  $this->setGetArray(array('status' => Mission::STATUS_TAKEN,
361  'id' => $missions[0]->id));
362  $this->runControllerWithNoExceptionsAndGetContent('missions/default/ajaxChangeStatus');
363  $missions[0]->forget();
364  $missions = Mission::getAll();
365  $this->assertEquals(1, count($missions));
366  $this->assertEquals(Mission::STATUS_TAKEN, $missions[0]->status);
367  $this->assertTrue($missions[0]->takenByUser->isSame($mary));
368 
369  //Change status to complete
370  $mary = $this->logoutCurrentUserLoginNewUserAndGetByUsername('mary');
371  $this->setGetArray(array('status' => Mission::STATUS_COMPLETED,
372  'id' => $missions[0]->id));
373  $this->runControllerWithNoExceptionsAndGetContent('missions/default/ajaxChangeStatus');
374  $missions[0]->forget();
375  $missions = Mission::getAll();
376  $this->assertEquals(1, count($missions));
377  $this->assertEquals(Mission::STATUS_COMPLETED, $missions[0]->status);
378  $this->assertTrue($missions[0]->takenByUser->isSame($mary));
379 
380  //Change status to accepted
381  $mary = $this->logoutCurrentUserLoginNewUserAndGetByUsername('mary');
382  $this->setGetArray(array('status' => Mission::STATUS_ACCEPTED,
383  'id' => $missions[0]->id));
384  $this->runControllerWithNoExceptionsAndGetContent('missions/default/ajaxChangeStatus');
385  $missions[0]->forget();
386  $missions = Mission::getAll();
387  $this->assertEquals(1, count($missions));
388  $this->assertEquals(Mission::STATUS_ACCEPTED, $missions[0]->status);
389  $this->assertTrue($missions[0]->takenByUser->isSame($mary));
390  }
391 
396  {
398  $missions = Mission::getAll();
399  $this->assertEquals(1, count($missions));
400  $mission = $missions[0];
401  $this->assertEquals(0, $mission->comments->count());
404  $messageCount = 0;
405  $this->assertEquals(0, Yii::app()->emailHelper->getSentCount());
406 
407  //Save new comment.
408  $this->setGetArray(array('relatedModelId' => $mission->id,
409  'relatedModelClassName' => 'Mission',
410  'relatedModelRelationName' => 'comments',
411  'redirectUrl' => 'someRedirect'));
412  $this->setPostArray(array('Comment' => array('description' => 'a ValidComment Name')));
413  $this->runControllerWithRedirectExceptionAndGetContent('comments/default/inlineCreateSave');
414  $this->assertEquals(1, $mission->comments->count());
415  $this->assertEquals($messageCount + 1, Yii::app()->emailHelper->getQueuedCount());
416  $this->assertEquals(0, Yii::app()->emailHelper->getSentCount());
417  $emailMessages = EmailMessage::getAll();
418  $emailMessage = $emailMessages[$messageCount];
419  $this->assertEquals(1, count($emailMessage->recipients));
420  $this->assertContains('mission', $emailMessage->subject);
421  $this->assertContains(strval($mission), $emailMessage->subject);
422  $this->assertContains(strval($mission->comments[0]), $emailMessage->content->htmlContent);
423  $this->assertContains(strval($mission->comments[0]), $emailMessage->content->textContent);
424  $notifications = Notification::getAll();
425  $notification = $notifications[$messageCount];
426  $this->assertCount(1, $notifications);
427  $this->assertEquals('Mission comment creation or modification', strval($notification));
428  $this->assertContains(strval($mission->comments[0]), $notification->notificationMessage->htmlContent);
429  $this->assertContains(strval($mission->comments[0]), $notification->notificationMessage->textContent);
430  }
431 
432  public function testMissionReadUnreadStatus()
433  {
434  $steven = User::getByUsername('steven');
435  $sally = User::getByUsername('sally');
436  $mary = User::getByUsername('mary');
437  $super = $this->
439 
440  $mission = new Mission();
441  $mission->owner = $steven;
442  $mission->description = 'My test mission description';
443  $mission->status = Mission::STATUS_AVAILABLE;
444  $this->assertTrue($mission->save());
445  $missionId = $mission->id;
446  $explicitReadWriteModelPermissions = new ExplicitReadWriteModelPermissions();
447  $explicitReadWriteModelPermissions->addReadWritePermitable(Group::getByName(Group::EVERYONE_GROUP_NAME));
449  resolveExplicitReadWriteModelPermissions($mission, $explicitReadWriteModelPermissions);
450  $mission = Mission::getById($missionId);
451  //Confirm users have mission marked as unread but not owner
452  $this->assertTrue (MissionsUtil::hasUserReadMissionLatest($mission, $steven));
453  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $super));
454  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $sally));
455  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $mary));
456 
457  //Super reads the mission
458  $this->setGetArray(array('id' => $missionId));
459  $this->runControllerWithNoExceptionsAndGetContent('missions/default/details');
460  $mission = Mission::getById($missionId);
461  $this->assertTrue (MissionsUtil::hasUserReadMissionLatest($mission, $steven));
462  $this->assertTrue (MissionsUtil::hasUserReadMissionLatest($mission, $super));
463  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $sally));
464  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $mary));
465 
466  //Mary marks mission as read and post a comment
468  MissionsUtil::markUserHasReadLatest($mission, $mary);
469  $this->setGetArray(array('relatedModelId' => $missionId,
470  'relatedModelClassName' => 'Mission',
471  'relatedModelRelationName' => 'comments',
472  'redirectUrl' => 'someRedirect'));
473  $this->setPostArray(array('Comment' => array('description' => 'Mary\'s new comment')));
474  $this->runControllerWithRedirectExceptionAndGetContent('comments/default/inlineCreateSave');
475  $mission = Mission::getById($missionId);
476  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $steven));
477  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $super));
478  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $sally));
479  $this->assertTrue (MissionsUtil::hasUserReadMissionLatest($mission, $mary));
480 
481  //Sally reads and takes the mission
483  $this->setGetArray(array('id' => $missionId));
484  $this->resetPostArray();
485  $this->runControllerWithNoExceptionsAndGetContent('missions/default/details');
486  $mission = Mission::getById($missionId);
487  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $steven));
488  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $super));
489  $this->assertTrue (MissionsUtil::hasUserReadMissionLatest($mission, $sally));
490  $this->assertTrue (MissionsUtil::hasUserReadMissionLatest($mission, $mary));
491  $this->setGetArray(array('status' => Mission::STATUS_TAKEN,
492  'id' => $missionId));
493  $this->runControllerWithNoExceptionsAndGetContent('missions/default/ajaxChangeStatus');
494 
495  //Every user other than owner and takenby are marked as read latest
496  $mission = Mission::getById($missionId);
497  $this->assertFalse(MissionsUtil::hasUserReadMissionLatest($mission, $steven));
498  $this->assertTrue (MissionsUtil::hasUserReadMissionLatest($mission, $super));
499  $this->assertTrue (MissionsUtil::hasUserReadMissionLatest($mission, $sally));
500  $this->assertTrue (MissionsUtil::hasUserReadMissionLatest($mission, $mary));
501  }
502  }
503 ?>
static makeBySecurableItem(SecurableItem $securableItem)
static rebuild($overwriteExistingTables=true, $forcePhp=false, $messageStreamer=null)
static getByUsername($username)
Definition: User.php:49
static resolveExplicitReadWriteModelPermissions(SecurableItem $securableItem, ExplicitReadWriteModelPermissions $explicitReadWriteModelPermissions, $validate=false)
static markUserHasReadLatest(Mission $mission, User $user)
runControllerWithRedirectExceptionAndGetContent($route, $compareUrl=null, $compareUrlContains=false)
static hasUserReadMissionLatest(Mission $mission, User $user)
static getByName($name)
Definition: Group.php:57
static deleteAll()
static getCount(RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter=null, $where=null, $modelClassName=null, $selectDistinct=false)
static getById($id, $modelClassName=null)
logoutCurrentUserLoginNewUserAndGetByUsername($username)
runControllerWithNoExceptionsAndGetContent($route, $empty=false)
static getAll($orderBy=null, $sortDescending=false, $modelClassName=null)
Generated on Tue May 26 2020 07:10:33