mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 09:23:58 +08:00
Minor codestyle fixes
This commit is contained in:
parent
28cadb987e
commit
00fe267a2a
2 changed files with 16 additions and 16 deletions
|
@ -5,15 +5,15 @@ module User::ProjectRoles
|
|||
|
||||
aspector do
|
||||
# Check if user is member of project
|
||||
around [
|
||||
:is_member_of_project?,
|
||||
:is_owner_of_project?,
|
||||
:is_user_of_project?,
|
||||
:is_user_or_higher_of_project?,
|
||||
:is_technician_of_project?,
|
||||
:is_technician_or_higher_of_project?,
|
||||
:is_viewer_of_project?
|
||||
] do |proxy, *args, &block|
|
||||
around %i(
|
||||
is_member_of_project?
|
||||
is_owner_of_project?
|
||||
is_user_of_project?
|
||||
is_user_or_higher_of_project?
|
||||
is_technician_of_project?
|
||||
is_technician_or_higher_of_project?
|
||||
is_viewer_of_project?
|
||||
) do |proxy, *args, &block|
|
||||
if args[0]
|
||||
@user_project = user_projects.where(project: args[0]).take
|
||||
@user_project ? proxy.call(*args, &block) : false
|
||||
|
|
|
@ -5,13 +5,13 @@ module User::TeamRoles
|
|||
|
||||
aspector do
|
||||
# Check if user is member of team
|
||||
around [
|
||||
:is_member_of_team?,
|
||||
:is_admin_of_team?,
|
||||
:is_normal_user_of_team?,
|
||||
:is_normal_user_or_admin_of_team?,
|
||||
:is_guest_of_team?
|
||||
] do |proxy, *args, &block|
|
||||
around %i(
|
||||
is_member_of_team?
|
||||
is_admin_of_team?
|
||||
is_normal_user_of_team?
|
||||
is_normal_user_or_admin_of_team?
|
||||
is_guest_of_team?
|
||||
) do |proxy, *args, &block|
|
||||
if args[0]
|
||||
@user_team = user_teams.where(team: args[0]).take
|
||||
@user_team ? proxy.call(*args, &block) : false
|
||||
|
|
Loading…
Reference in a new issue