Questions tagged [scopes]

An OAuth Scope is a permission setting that limits the permissiveness of a given OAuth Token. Clients therefore provide a list of desired Scopes when obtaining a Token (alongside standard OAuth ClientId and Client Authentication details). The Token will then be granted (or not) according to the Authentication process and the Scopes granted for the given Client Id

383 questions
3
votes
1 answer

Require scope in activeadmin resource

I am using activeadmin and need to figure out how to require a scope to only show records pertaining to the current user. I also have other scopes that users can select, but those scopes need to be "pre-scoped" so to speak so that only records…
Sean
  • 1,078
  • 14
  • 25
3
votes
1 answer

Variable's validity range

Possible Duplicate: Why can't a duplicate variable name be declared in a nested local scope? Hy guys, today I found an issue, on which i am not sure: I thought the following example should be correct, because the braces create a new local area,…
Iqon
  • 1,920
  • 12
  • 20
3
votes
2 answers

Is there an elegant one liner to append scopes stored in an array using .send()?

Here is what I have currently, I'm doing this: current_account.send(object).search(params[:search]).user_id_equals_any(users).visibility_is_any(visibilities) but thats not very flexible? What if I want to conditionally not have one of those…
NullVoxPopuli
  • 61,906
  • 73
  • 206
  • 352
2
votes
1 answer

Rails Scope Not Working When Regular where() Query Does

I am trying to build a relatively simple named scope in my Products class. Oddly, if I issue the query directly (a la Product.where()), I get the results I expect. However, if this query is changed to a scope declaration, the result set is nil. Why…
Tom Corelis
  • 4,990
  • 11
  • 35
  • 48
2
votes
1 answer

Use the Advanced Sheets Service with permissions only for current sheet

I want to use the Advanced Sheets Service, i.e., "Sheets.Spreadsheets.Values..." in my Google Apps Script add-on (to write to multiple ranges at once) only for the current sheet. But when I add the service to my Apps Script, it requires permission…
2
votes
2 answers

How to change Script-scoped variable with function in powershell?

Have the script [int] $num01 = 2 function setNo ([int] $num02) { $num01 = $num02; } write-host $num01 setNo -num02 4 write-host $num01 setNo -num02 6 write-host $num01 It produces an output 2 2 2 How to make it produce output: 2 4 6
Fedor Pinega
  • 73
  • 1
  • 8
2
votes
1 answer

What is the correct use of scopes and app roles in an Azure AD web api with user and daemon clients?

I have a web api to access "resources". These are not user specific resources. There is a "reader" app role. User1 is added to "reader" role App1 has been granted permission to the "reader" role [HttpGet] [Authorize(Roles =…
Jason Hernandez
  • 2,907
  • 1
  • 19
  • 30
2
votes
0 answers

How to add dynamically filters from properties in spring boot?

In our current version, we are able to load one filter from properties because it is creating a bean with the annotation @Bean, by creating a single FilterRegistrationBean. My problem comes when I try to create multiple beans because there is not…
German20
  • 17
  • 3
2
votes
1 answer

Couchbase : List available Buckets, scopes and collection available in a Cluster with Java SDK 3

Working on a Java application I would like to list all available buckets / scopes and collections available for choice by the user. This is written using Couchbase Java SDK 3.0 I did not find any resources on the web. Many thanks,
2
votes
2 answers

Laravel tap into moment before query execution

I am using Laravel scopes to limit what the end user can see based on some provided input, however with my current use-case this is no longer acceptable. Before applying additional queries, I would like to see what Eloquent method is being called,…
Norgul
  • 4,613
  • 13
  • 61
  • 144
2
votes
2 answers

Gracefully exiting Laravel scopes

I have a scope which is acting in a limiting fashion depending on a user role in a way that you can forward a set of rules to the scope limiting the final output from the DB. A really simplified role limit example: { "first_name":…
Norgul
  • 4,613
  • 13
  • 61
  • 144
2
votes
1 answer

Adding new roles to WSO2 API-M with login & subscribe permissions does not allow user to login to subscriber portal

I'm using WSO2 API-M v3.0.0, and I have created a new role with Login & Subscribe permissions (same permissions that are granted to the "Internal/subscriber" role). But users within this new role are unable to login to the subscriber portal as…
2
votes
1 answer

Getting an error when initializing a variable in C#

using System; namespace MergeSortProgram { class MergeSort { // Merges two subarrays of arr[]. // First subarray is arr[l..m] // Second subarray is arr[m+1..r] public void merge(int [] arr, int l, int m,…
2
votes
1 answer

Auth0 ignores scope option

I have created React application with auth0 using this guide https://auth0.com/docs/quickstart/spa/react/01-login Everything works fine. But now I want to get user metadata in my React app. I have extended my Auth0Client constructor with scope…
Oleg
  • 1,048
  • 1
  • 9
  • 18
2
votes
2 answers

Rails Searchkick with scopes in controller

I'm making a search page where I have a couple of filters on the side and I'm trying to integrate them with Searchkick to query products. These are my scopes I'm using for the products models/product.rb scope :in_price_range, ->(range) {…