• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining login privileges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Determining login privileges (From: Antonio Nunes <email@hidden>)

  • Prev by Date: Re: NSTextView subclass redrawing weirdness
  • Next by Date: Querying the front application
  • Previous by thread: Determining login privileges
  • Next by thread: Querying the front application
  • Index(es):
    • Date
    • Thread