user-permissions

Grails check role access for specific controller action

守給你的承諾、 提交于 2019-12-06 05:56:12
问题 I need to display/hide action buttons depending if the user can access (by role definition) the specific controller/action. I'm using Spring Security plugin. My goal is to used the annotation @Secured("ROLE_...") for every method of each of my controller and I'm looking for a way to check, before calling the action, if the user has access to this specific action. I'm guessing there is way to check this because the annotation brings the information but I cannot find any solution. In this

java.io.IOException: Permission denied in Java

你离开我真会死。 提交于 2019-12-06 04:32:05
I am trying to create a file into the same folder in my project, but I am not able to create that file dynamically. I am trying this: try { System.out.println("path"+System.getProperty("user.dir")); File file = new File("/textfile.txt"); file.createNewFile(); //file.createNewFile(); } catch (Exception e) { e.printStackTrace(); } What I am getting error is this: java.io.IOException: Permission denied Any suggestion will be welcomed. To create a File into the same folder in your project, your path has to be relative. The path that you are giving is absolute, because it is starting from / . For

cancel_url URL is not correctly formatted

懵懂的女人 提交于 2019-12-06 04:30:26
Have had Facebook authentication working great (not SSO) for the last 6 weeks within an IOS app however over the last couple of days it has broke. (no code, settings have changed) When a new User logs in it comes up with the following error: API Errorcode:100 API error description: invalid parameter Error message: cancel_url URL is not correctly formatted (if a user has already authenticated the app then it works fine) If the user cancels the dialog and goes to log in again then it comes up with the permissions dialog straight away which leads me to believe the link is broken between the login

ScreenCapture via MediaProjection without user intervention in Kiosk apps - Android

北城余情 提交于 2019-12-06 03:26:53
I work for a digital signage company which has Android devices running in kiosk mode. Lately, we wanted to add screen capture for debugging. The easiest way to do that was to use getWindow().getDecorView().getRootView().getDrawingCache() to create bitmap and to send it over the network, but this will not capture videos as it's been rendered in surface view. MediaProjection's createVirtualDisplay seems promising, but the explicit permission needed to use this feature is not acceptable. Even requesting user permission for the first time and persisting the result for further use is not acceptable

Why is my Delphi 6 program triggering a request for admin rights upon install on only a minority of Windows 7 systems (InnoSetup)?

我的梦境 提交于 2019-12-04 18:10:00
I have a Delphi 6 program that for most users installs fine while running under a user account without admin privileges. However, on some systems it triggers a request for admin rights. Unfortunately mine isn't one of them so it's hard for me to diagnose this problem. I use InnoSetup 5.1.9 to build my install programs. How can I figure out what I need to change about my installation program's configuration to neutralize the need for admin rights on some people's systems? It's causing trouble for my system because during installation, certain program data files are being copied into the admin

How to limit a users SSH access to certain folders

倖福魔咒の 提交于 2019-12-04 16:51:30
Currently, the project we are working on has a freelance front-end developer involved. As we have never used him before we are looking for a way to limit his access to our servers and files but at the same time let him modify the view files currently on these servers. The current project (all on one server) is compartmentalised into 6 separate mini sites, all using an MVC structure. e.g. Mini Site 1 -- Models -- Views -- Controllers Mini Site 2 -- Models -- Views -- Controllers etc We need to limit his access to each view folder for each project but nothing else. We are using Amazon EC2 and

How to set permissions in an svn repository?

断了今生、忘了曾经 提交于 2019-12-04 16:10:23
问题 I created a repository on a network drive with svnadmin create repos . Is there a way to set user permissions to the repository? And if that is the case how can those permissions be set? 回答1: If you need to manage access via svn:// protocol (embedded authorization), all you need to do is to change files in conf folder of your newly created repository: Set up passwd ( repos/conf/passwd ) in order to define a list of users and passwords Set up authz ( repos/conf/authz ) in order to define

Rails 3 company account with many users, restrict access to data

血红的双手。 提交于 2019-12-04 15:35:57
I'm wondering about the best way to structure authentication/authorization in my app. I want to have many company accounts, possibly using subdomains account has many users and users can only access records that were created by themselves or another user with the same account. The research I've done provides lots of mix n' match ideas for combining devise / cancan / authlogic in weird and wonderful ways, but I've yet to find anything which shows me the best way to restrict user access to data within the same model. So for instance: Account 1: Eurasia User 1: Bob User 2: Jim Account 2: Eastasia

AddressAccessDeniedException : resolve it without netsh?

一个人想着一个人 提交于 2019-12-04 13:28:05
问题 I encountered the exception AddressAccessDeniedException because my processus does not have the right to register the URL. I first ran my program as an administrator : ok, it worked. But I now want to distribute my application, and I would like every user to be able to run it without having to be administrator. Is there a way to automatically grant the access to the user? I saw the command : netsh http add urlacl url=http://+:8000/ user=DOMAIN\UserName Should I use that? If yes, how? What I

Grails check role access for specific controller action

前提是你 提交于 2019-12-04 11:37:13
I need to display/hide action buttons depending if the user can access (by role definition) the specific controller/action. I'm using Spring Security plugin. My goal is to used the annotation @Secured("ROLE_...") for every method of each of my controller and I'm looking for a way to check, before calling the action, if the user has access to this specific action. I'm guessing there is way to check this because the annotation brings the information but I cannot find any solution. In this example I'm trying to find the HASACCESS method: The controller with the @Secured annotation class