Questions tagged [policies]

200 questions
4
votes
1 answer

Different Policies for "Resource" routes in Laravel

I have a system where Admin can manage doctors and doctor has ability to manage itself. For this, I am using Laravel Authorization using policies. I registered a policy for admins that it can access doctors like: Route::resource('doctors',…
tsid145b
  • 43
  • 5
4
votes
3 answers

Laravel policies strangely not working

The point is simple: I have a UserPolicy method that checks if a user wants to edit his/her own profile. So I did like this: public function update(User $user, User $model) { return $user->id === $model->id; } And this is called in a…
user6168095
4
votes
4 answers

How to create dynamic policies in sails.js

I have been working on a project where i need to create and assign policies according to access rights/levels to user in sails.js Each user can access all levels below his level, like admin has an level 9 and he can access all levels below level…
Adarsh Nahar
  • 319
  • 3
  • 10
4
votes
2 answers

Disable cmd and PowerShell on Windows Server 2012 for clients

I'm using Windows Server 2012, and I want to disable the cmd and the PowerShell for the clients. I've searched in the Group Policies but i didn't find where I can do this. Please can somebody help me?
krusty
  • 103
  • 1
  • 1
  • 8
3
votes
4 answers

iOS Get Country Where The Device User Is Located

We’re developing an iOS app. One requirement we have is, get the country of the user location to enforce restrictions in the app. One solution we’re thinking about is to gather the IP address and use it with a Geo-localization service to get the…
shinjidev
  • 383
  • 1
  • 6
  • 21
3
votes
1 answer

add-iam-poilcy-binding vs set-iam-policy

I cannot get my head around what is the difference between both. add-iam-policy-binding is binding a policy (defined in a role, including custom role) to an iam user (user, service account, group) for a project. get-iam-policy/set-iam-policy also…
peacefulmember
  • 293
  • 2
  • 5
  • 14
3
votes
2 answers

Laravel policy return unauthorized

I am trying to implement policies in my project. All tries have proven unsuccessful despite following documentation to the letter. And also read numerous posts on SO about it and other media. I did as described in docs, but nonetheless it doesn't…
3
votes
0 answers

How to to create a branch policy (or similar) in azure devops which forces extra reviewers on custom conditions

I want to add extra reviewers to a pull request if the changeset breaks some custom rules. I know I can add extra reviewers if certain files are touched. But in our case if we see certain things in any changed file (for instance certain columns are…
Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
3
votes
1 answer

Aws IAM Roles vs Bucket Policies

I have been reading a number of docs and watched number of videos, but I am still very confused about IAM Roles and Bucket policies. Here is what confuses me: 1) I create a bucket. At that time I can make it public or keep it private. If I make it…
Satya Rao
  • 149
  • 2
  • 3
3
votes
1 answer

Laravel Authorization policy not getting called

I'm having trouble getting one of my auth policies to run correctly, resulting in the authorization attempt always returning false. I'm even just forcing the function to return true for the sake of testing. I'm using Laravel 5.4, here's my policy…
Collin Henderson
  • 1,154
  • 10
  • 22
3
votes
1 answer

Aws S3 Only PutObject Policy

i'm trying to setup a Only PutObject policy to by bucket as following: { "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt####", "Effect": "Allow", "Action": [ "s3:PutObject", …
Fabrizio Fenoglio
  • 5,767
  • 14
  • 38
  • 75
3
votes
2 answers

Adaptive replacement cache algorithm

I'm trying to implement the Adaptative Replacement Cache algorithm but, i'm reading in the literature, and i can't understand the algorithm. Anyone can explain me that algorithm? I see that it use two lists L1 to the frequency and L2 to the…
PRVS
  • 1,612
  • 4
  • 38
  • 75
2
votes
0 answers

Use Google Play for billing or other system for mobile app

I am developing a mobile app where users can create works of art for purchase. In order to download the completed art, the user must purchase the artwork. The artwork is then downloaded as a PNG to the user's device. The image can only be used…
user2233706
  • 6,148
  • 5
  • 44
  • 86
2
votes
1 answer

Use azure Apim to Call an Api that uses OAuth2 token

With Apim i'm trying to call a backend Api that needs a OAuth2 validation. This question are more or less similair to this: Azure API Management: Oauth2 with backend API But there are no good answer here... I have been reading alot about policies…
Lise
  • 63
  • 12
2
votes
1 answer

admins unable to access the admin dashboard laravel 8

I am using policies to prevent users from accessing the admin panel. Only admins can be able to access the admin panel. I have created the policies and registered them in the authservice provider. The problem is when an admin logins in they are…
1
2
3
13 14