-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #371 from creative-commoners/pulls/5.0/admins-can-…
…always-edit FIX Admin users can always edit records that have active workflow transitions
- Loading branch information
Showing
4 changed files
with
76 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Symbiote\AdvancedWorkflow\Tests\DataObjects; | ||
|
||
use SilverStripe\Dev\SapphireTest; | ||
use SilverStripe\ORM\DataObject; | ||
use Symbiote\AdvancedWorkflow\DataObjects\WorkflowAction; | ||
|
||
class WorkflowActionTest extends SapphireTest | ||
{ | ||
protected $usesDatabase = true; | ||
|
||
public function testAdminUsersCanAlwaysEdit() | ||
{ | ||
$this->logInWithPermission('ADMIN'); | ||
$action = new WorkflowAction(); | ||
$this->assertTrue($action->canEditTarget(new DataObject)); | ||
} | ||
} |