Minor codestyle fixes

This commit is contained in:
Luka Murn 2017-11-23 11:33:39 +01:00
parent 28cadb987e
commit 00fe267a2a
2 changed files with 16 additions and 16 deletions

View file

@ -5,15 +5,15 @@ module User::ProjectRoles
aspector do aspector do
# Check if user is member of project # Check if user is member of project
around [ around %i(
:is_member_of_project?, is_member_of_project?
:is_owner_of_project?, is_owner_of_project?
:is_user_of_project?, is_user_of_project?
:is_user_or_higher_of_project?, is_user_or_higher_of_project?
:is_technician_of_project?, is_technician_of_project?
:is_technician_or_higher_of_project?, is_technician_or_higher_of_project?
:is_viewer_of_project? is_viewer_of_project?
] do |proxy, *args, &block| ) do |proxy, *args, &block|
if args[0] if args[0]
@user_project = user_projects.where(project: args[0]).take @user_project = user_projects.where(project: args[0]).take
@user_project ? proxy.call(*args, &block) : false @user_project ? proxy.call(*args, &block) : false

View file

@ -5,13 +5,13 @@ module User::TeamRoles
aspector do aspector do
# Check if user is member of team # Check if user is member of team
around [ around %i(
:is_member_of_team?, is_member_of_team?
:is_admin_of_team?, is_admin_of_team?
:is_normal_user_of_team?, is_normal_user_of_team?
:is_normal_user_or_admin_of_team?, is_normal_user_or_admin_of_team?
:is_guest_of_team? is_guest_of_team?
] do |proxy, *args, &block| ) do |proxy, *args, &block|
if args[0] if args[0]
@user_team = user_teams.where(team: args[0]).take @user_team = user_teams.where(team: args[0]).take
@user_team ? proxy.call(*args, &block) : false @user_team ? proxy.call(*args, &block) : false