lib/seek/permissions/policy_based_authorization.rb
#the record count for entries within the authorization lookup table for a given user_id or user. Used to determine if the table is complete
the record count for entries within the authorization lookup table for a given user_id or user. Used to determine if the table is complete
the record count for entries within the authorization lookup table for a given user_id or user . Used to determine if the table is complete
def lookup_count_for_user user_id
          unless user_id.is_a?(Numeric)
            user_id = user_id.nil? ? 0 : user_id.id
          end
          sql = "select count(*) from #{lookup_table_name} where user_id = #{user_id}"
          ActiveRecord::Base.connection.select_one(sql).values[0].to_i
        end
def lookup_count_for_user user_id unless user_id . is_a? ( Numeric ) user_id = user_id . nil? ? 0 : user_id . id end sql = "select count(*) from #{lookup_table_name} where user_id = #{user_id}" ActiveRecord :: Base . connection . select_one ( sql ) . values [ 0 ] . to_i end
the record count for entries within the authorization lookup table for a given user_id or user.
the record count for entries within the authorization lookup table for a given user_id or user .
user_id