mirror of
https://github.com/nov/fb_graph2
synced 2023-03-27 23:22:15 -04:00
add/remove app roles
This commit is contained in:
parent
85c161cbb4
commit
32039cc401
1 changed files with 12 additions and 0 deletions
|
@ -8,6 +8,18 @@ module FbGraph2
|
|||
Struct::Role.new role
|
||||
end
|
||||
end
|
||||
|
||||
def role!(user, params = {})
|
||||
self.post params.merge(
|
||||
user: Util.as_identifier(user)
|
||||
), edge: :roles
|
||||
end
|
||||
|
||||
def unrole!(user, params = {})
|
||||
self.post params.merge(
|
||||
user: Util.as_identifier(user)
|
||||
), edge: :roles
|
||||
end
|
||||
end
|
||||
|
||||
module PageContext
|
||||
|
|
Loading…
Reference in a new issue