Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2016-04-09 12:37:58 +0100
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
1a7de4c2d6c7986e70722f170eb06f825ede6459
1a7de4c2
1 parent
66ba7733
Fixed and cleaned some permisison/role based components
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
app/Permission.php
app/Role.php
app/Permission.php
View file @
1a7de4c
...
...
@@ -11,7 +11,7 @@ class Permission extends Model
*/
public
function
roles
()
{
return
$this
->
belongsToMany
(
'BookStack\
Permissions
'
);
return
$this
->
belongsToMany
(
'BookStack\
Role
'
);
}
/**
...
...
app/Role.php
View file @
1a7de4c
...
...
@@ -44,6 +44,15 @@ class Role extends Model
}
/**
* Detach a single permission from this role.
* @param Permission $permission
*/
public
function
detachPermission
(
Permission
$permission
)
{
$this
->
permissions
()
->
detach
(
$permission
->
id
);
}
/**
* Get the role object for the specified role.
* @param $roleName
* @return mixed
...
...
Please
register
or
sign in
to post a comment