authorization

acl for edit post page?

我的梦境 提交于 2019-12-12 01:32:31
问题 i wonder if i shld use an ACL rule (PHP/ Zend_Acl in my case) for something as small as a edit post page? i guess the criteria to allow users to edit a post will be owner of post editors/moderators/admin the question will be if yes (to use acl), how can i define it (i am using Zend_Acl but if u give me some code example, i might be able to translate it). acl's i think will generally be defined at application start/bootstrap. in this case, its partially dynamic as in i must chk against the

Automated testing of authorization scenarios implemented with AzMan

我只是一个虾纸丫 提交于 2019-12-12 01:17:17
问题 I have a web application that uses AzMan authorization to grant different functionality to different users. I've just started using WatiN to implement some automated web UI tests that run under Visual Studio Team System/TFS. I'd like to be able to use it to verify the different authorization scenarios. To do this though I'd need to be able to run different tests as different users who are granted differing rights through AzMan (using dummy test accounts). Does anyone have experience with

How to running application under root privilege?

こ雲淡風輕ζ 提交于 2019-12-12 00:41:54
问题 Please tell me a way grant for my application to modify /Library/Fonts folder as add new and remove font file. Thanks in advance. 回答1: You can split your application into two parts: service(daemon) and UI and install them via installer in the way so your service will have root privileges You can run some command from your app using AuthorizationExecuteWithPrivileges() but it is deprecated. Still it works You can run some command via NSAppleScript using "do shell script \"some script\" with

How to specify message body in a WebClient?

喜欢而已 提交于 2019-12-11 23:45:51
问题 In the console, I follow up a call the site I'm on is is making and I can see the address ( some.site.com/gettoken ), message header and something that FF calls Message Body . It's in the latter that I can see the credentials that I've entered on the site that are being sent. So, I've got the URL and the message body. Then, I've tried to implement the behavior using C# for my Azure service layer like so. String url = @"https://some.site.com/gettoken"; String credentials = "username=super

I am having problems using Java MongoClient to access collections in my database

牧云@^-^@ 提交于 2019-12-11 22:54:49
问题 I have been battling to access MongoDB collections in my openshift web application from my Java client, and failing at every turn. I can connect but cannot query the collections in any way. Here is the current error message: JBWEB000070: exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference

Why doesn't Google Map show on release key?

南笙酒味 提交于 2019-12-11 21:25:10
问题 Why doesn't Google Map show on release authentication key? Before I use release key, it ran normally. Here is my log: 09-10 11:01:25.361: E/b(21729): Authentication failed on the server. 09-10 11:01:25.361: E/Google Maps Android API(21729): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map. 09-10 11:01:25.391: E/Google Maps Android API(21729): In the Google Developer Console (https://console.developers.google

Can I programmatically determine the database “context” to use based on user credentials?

北战南征 提交于 2019-12-11 21:18:51
问题 This is a followup to the question here, where the answer seems to refer to an overly-complicated and overly-specific (EF, which I'm not using - not even using an ORM). There has to be a more straightforward way around this common scenario than the smoke, mirrors, and sorcery hinted at in that answer. Note: I encased "context" in parenthesis because I'm not using EF, so it is not a literal "dbcontext" that I'm talking about here. So I got to wondering: Could I set a global variable for each

Best way to do authorization in webforms

荒凉一梦 提交于 2019-12-11 19:46:20
问题 Every bit of research on this topic is showing how to do this tasks with MVC, my project is MVP webforms based. I have the authentication done, but is there a pattern or strategy to best do authorization? Such as checking for hotlinking on specific pages against a user's role, or hiding ASP controls given a role. Currently I'm doing things like: if(user.Roles.Contains("Admin")){ lnkAdmin.Visibility = true; } And I don't think that's very clean or maintainable, is there a better way to do

Laravel using web authentication in all api routes redirect to home

时光总嘲笑我的痴心妄想 提交于 2019-12-11 19:26:43
问题 i want to use web authentication for all api routes. I created middleware and this is how it looks like Route::group(['middleware' => ['auth:web'], 'prefix' => 'v1',], function ($router) { Route::apiResource('subscriptions', 'Api\SubscriptionController'); Route::post('subscriptions/{id}/resend', 'Api\SubscriptionController@resend')->name('resend'); Route::post('subscriptions/{id}/grace', 'Api\SubscriptionController@addGrace')->name('grace'); Route::apiResource('accounts', 'Api

How do I design the retrieval and processing of all user roles?

旧街凉风 提交于 2019-12-11 18:09:15
问题 I am building an intranet with ASP.NET core 2.0 MVC. All users are part of an active directory. Additionaly I have a MSSQL database with the following tables: Users (Id, FirstName, UserNameAd (unique), ...) Roles (Id, RoleName) UserRoles (User_Id, Role_Id) In my web application I now want to retrieve the roles of a user and store them in the Authentication/Identity Classes of Microsoft in order to use [Authenticate(Roles="Admin")] stuff. I am not sure where I shall put this role-request and