Re: Determining login privileges
Re: Determining login privileges
- Subject: Re: Determining login privileges
- From: "Finlay Dobbie" <email@hidden>
- Date: Sun, 9 Jul 2006 08:53:26 +0100
On 09/07/06, Antonio Nunes <email@hidden> wrote:
I need to be able to determine whether my running app has the ability
to create a folder in /Library/Application Support. I've been hunting
for this for a couple of days now, but am not getting any closer to
the solution.
See NSFileManager's -isWritableFileAtPath:
I haven't found any pointers in the docs, nor online, to help
determine either if the app can write to the desired folder or if the
current user has admin privileges. The only thing I can think of is
to try to create a file in the directory and see whether it fails,
but that seems a wrong way to go about it. I'm sure there must be a
more appropriate technique for this.
Actually, that's probably the best way to go about it.
Alternatively I
could always install the license file in /Library/Application
Support, but am I correct that I then need to request authorization
from the user and use a helper tool if the user is logged in without
admin privileges?
Yes.
-- Finlay
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden