• 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: Writing kCFPreferencesAnyUser preferences by limited user
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing kCFPreferencesAnyUser preferences by limited user


  • Subject: Re: Writing kCFPreferencesAnyUser preferences by limited user
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 13 Feb 2009 17:34:34 -0800


On 2009 Feb 13, at 16:54, Nick Zitzmann wrote:


On Feb 13, 2009, at 4:54 PM, Alexander Shmelev wrote:

I have found that I should use Security.framework. Then I wrote code below, it shows authentication dialog for limited user, but settings still not saving for limited user.
What do I do wrong? Could you advise me how to fix code?


You can't elevate an existing task's privileges, so you'll have to do whatever you need to do in a helper app invoked with AuthorizationExecuteWithPrivileges(). See the BetterAuthorizationSample sample code on ADC for details.

Nick is correct about BetterAuthorizationSample.

While scratching my head over BetterAuthorizationSample during a week or so last year, I wrote a wrapper for it which you might find useful or at least enlightening....

http://www.sheepsystems.com/sourceCode/authTasksCocoa.html

Read the readme.rtf in the project. One of the "application cases" included in the demo is writing to kCFPreferencesAnyUser, since I needed to do that too.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Writing kCFPreferencesAnyUser preferences by limited user (From: Alexander Shmelev <email@hidden>)
 >Re: Writing kCFPreferencesAnyUser preferences by limited user (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: How to handle clicks on NSOutlineView
  • Next by Date: Re: NSRunLoop / CFRunLoop
  • Previous by thread: Re: Writing kCFPreferencesAnyUser preferences by limited user
  • Next by thread: Cursor color in NSTextField?
  • Index(es):
    • Date
    • Thread