Sha256: 57b9c99e16aa4952dc35877e8fa98e38c55d5e3f3525121919cd4436fde86bab

Contents?: true

Size: 388 Bytes

Versions: 52

Compression:

Stored size: 388 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module UsersHelper
    def current_user_is_developer?
      current_user.has_role?(:devops)
    end

    def current_user_is_super_admin?
      current_user.has_role?(:super_admin) || current_user_is_developer?
    end

    def current_user_is_admin?
      current_user.has_role?(:admin) || current_user_is_super_admin?
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/helpers/renalware/users_helper.rb
renalware-core-2.1.0 app/helpers/renalware/users_helper.rb
renalware-core-2.0.167 app/helpers/renalware/users_helper.rb
renalware-core-2.0.166 app/helpers/renalware/users_helper.rb
renalware-core-2.0.165 app/helpers/renalware/users_helper.rb
renalware-core-2.0.164 app/helpers/renalware/users_helper.rb
renalware-core-2.0.163 app/helpers/renalware/users_helper.rb
renalware-core-2.0.162 app/helpers/renalware/users_helper.rb
renalware-core-2.0.161 app/helpers/renalware/users_helper.rb
renalware-core-2.0.160 app/helpers/renalware/users_helper.rb
renalware-core-2.0.159 app/helpers/renalware/users_helper.rb
renalware-core-2.0.158 app/helpers/renalware/users_helper.rb
renalware-core-2.0.157 app/helpers/renalware/users_helper.rb
renalware-core-2.0.156 app/helpers/renalware/users_helper.rb
renalware-core-2.0.155 app/helpers/renalware/users_helper.rb
renalware-core-2.0.153 app/helpers/renalware/users_helper.rb
renalware-core-2.0.152 app/helpers/renalware/users_helper.rb
renalware-core-2.0.151 app/helpers/renalware/users_helper.rb
renalware-core-2.0.149 app/helpers/renalware/users_helper.rb
renalware-core-2.0.148 app/helpers/renalware/users_helper.rb