rights

defining userroles with inheriting rights

≯℡__Kan透↙ 提交于 2019-12-06 14:19:12
I'm currently looking into the spring-security framework - great stuff so far, pretty impressed. However, I haven't found out where or how to define a inheritance of permissions. e.g. I want the ROLE_ADMIN to have at least the same rights as the ROLE_USER. I defined three intercep-urls for spring: <intercept-url pattern="/auth/login.do" access="permitAll"/> <intercept-url pattern="/voting/*" access="hasRole('ROLE_USER')"/> <intercept-url pattern="/admin/*" access="hasRole('ROLE_ADMIN')"/> When trying to access any site nesting from /voting/, while being logged in as a ROLE_ADMIN user, I am

Create a user with Java with lowest rights in OrientDB

对着背影说爱祢 提交于 2019-12-04 05:40:26
问题 I create a user with lowest rights in the following way: db.command(new OCommandScript("sql", "insert into orole set name = 'ardaRole', mode = 0")).execute(); db.command(new OCommandScript("sql", "update orole put rules = 'database.class', 2 where name = 'ardaRole'")).execute(); db.command(new OCommandScript("sql", "update orole put rules = 'database.function', 2 where name = 'ardaRole'")).execute(); db.command(new OCommandScript("sql", "update orole put rules = 'database.cluster', 2 where

Problems setting rights (SetEncryption) within pdf

久未见 提交于 2019-12-01 11:17:21
we run into problems using the product. It seems does some functions in iText 5.4.3 doesn’t working well? Please, can someone give us a hint how to solve that? We modify src.pdf to dest.pdf as follows: Function CreateFlattedPdf(ByRef originalPdf As Byte()) As Byte() Dim retValue As Byte() = Nothing Dim originalPdfReader As PdfReader = New PdfReader(originalPdf) Dim pdfKopie As MemoryStream = New MemoryStream() Dim pdfKopieStamper As PdfStamper = New PdfStamper(originalPdfReader, pdfKopie) pdfKopieStamper.SetEncryption(False, userPassword, ownerPassword, _ PdfWriter.ALLOW_ASSEMBLY _ Or

Why can I not set this ACL rule in C#?

半城伤御伤魂 提交于 2019-12-01 10:43:37
Running as an elevated admin on Vista SP1, my C# app tries to set the following rule with the following code. No error is produced, but neither is any change on the directory's ACL. What am I missing? public static void Main( string args[] ) { string dirPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Company"), "Product" ); Directory.Create(dirPath); _SetAcl(dirPath, "Users", FileSystemRights.FullControl); } private static void _SetAcl(string path, string identity, FileSystemRights rights) { var info = new DirectoryInfo(path); var acl = info

Request UAC Elevation c#

给你一囗甜甜゛ 提交于 2019-12-01 09:13:37
问题 Hi when i try to open my app in win-xp it works fine but when i try it on win7 it says access to path (path location) is denied unless i open it as administrator so how can i give my app administrator rights without promoting Thank you 回答1: You can't gain administrator rights on a system with UAC without passing through UAC elevation. Your options are: Manifest your app so that it always runs as administrator. The user sees the UAC dialog every time they start the app. Separate the part of

“tcpdump -w 1.pcap” works, but “tcpdump -C 100 -w 1.pcap” - permission denied

吃可爱长大的小学妹 提交于 2019-11-30 20:03:48
I need to limit file size when I run "tcpdump -w 1.pcap". I try to do this with the key "-C", but when I add it I get error "permission denied". So: > sudo tcpdump -w 1.pcap tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes ^C821 packets captured 847 packets received by filter 24 packets dropped by kernel But: > sudo tcpdump -C 100 -w 1.pcap tcpdump: 1.pcap: Permission denied I run the command from my home directory and I tried to remove and create the file before running the command with different permissions, finally I have: -rwxrwxrwx 1 root root 0 Aug 5 10

How to launch a QProcess with root rights?

守給你的承諾、 提交于 2019-11-30 16:23:18
I need to launch gphoto2 from a Qt program. I do this: QString gphotoProgram = "/usr/bin/gphoto2"; QStringList gphotoArguments; gphotoArguments << "--capture-image"; QProcess *gphotoProcess = new QProcess(this); gphotoProcess->start(gphotoProgram, gphotoArguments); but it never enters the Running state this way, as gphoto2 usually needs admin rights to be launched on command line. How can I start this QProcess with proper rights to make gphoto2 working? Edit: I precise that I would prefer the user to not have to enter a password, which means gksudo, kdesudo or any other graphical solution is

How to launch a QProcess with root rights?

时间秒杀一切 提交于 2019-11-30 16:17:46
问题 I need to launch gphoto2 from a Qt program. I do this: QString gphotoProgram = "/usr/bin/gphoto2"; QStringList gphotoArguments; gphotoArguments << "--capture-image"; QProcess *gphotoProcess = new QProcess(this); gphotoProcess->start(gphotoProgram, gphotoArguments); but it never enters the Running state this way, as gphoto2 usually needs admin rights to be launched on command line. How can I start this QProcess with proper rights to make gphoto2 working? Edit: I precise that I would prefer the

“tcpdump -w 1.pcap” works, but “tcpdump -C 100 -w 1.pcap” - permission denied

梦想与她 提交于 2019-11-30 04:24:35
问题 I need to limit file size when I run "tcpdump -w 1.pcap". I try to do this with the key "-C", but when I add it I get error "permission denied". So: > sudo tcpdump -w 1.pcap tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes ^C821 packets captured 847 packets received by filter 24 packets dropped by kernel But: > sudo tcpdump -C 100 -w 1.pcap tcpdump: 1.pcap: Permission denied I run the command from my home directory and I tried to remove and create the file

How can I create and save file in Program File directory in Windows 7?

不羁的心 提交于 2019-11-29 17:24:50
I have the program that show the registration window when it was started. When I set login and password the program must create some file in Program File/SomeProgram directory. I need administrator rights for this program. How can I run program with administrator rights if program isn't registered? So I need set administrator rights when I create file. I need some example code. You might consider writing to CommonAppData special folder, instead of Program Files. 来源: https://stackoverflow.com/questions/10648798/how-can-i-create-and-save-file-in-program-file-directory-in-windows-7