Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Running app as a user account

Running app as a user account
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2003
Location: Nebraska
Status: Offline
Reply With Quote
Jul 3, 2004, 03:29 PM
 
I have an idea for an application based on a bad job experience I had with a web client that insisted on being able to edit web site documents in an visual editor (in this case MS Front Page (shudder!)). Anyway the idea is to make an app that restricts editing of elements in an HTML document based on type of tag or specific tags (say provided the tags each have an ID attribute) using authenication on a user by user basis. I know there are Cocoa frameworks for this but the problem is this. Obviously it's not enough to restrict these things within the app itself since the user could simply use another application to edit the document however they wished. I think that I need to run the app on it's own account in the same way that apache or MySQL does giving it exclusive permission to edit specific HTML files, but I have no idea how to do that.

For now this app would be just for Mac as I don't even want to think about how Windows does this unless I think it's worth it.

Also, as I understand it, Webkit currently does not support access to the DOM of an HTML document. I imagine that a work around using a good amount of Javascript could be done with stringByEvaluatingJavaScriptFromString method but I'm not sure. Has there been any changes along those lines in the newest version?
     
Senior User
Join Date: Feb 2003
Location: USA
Status: Offline
Reply With Quote
Jul 3, 2004, 05:00 PM
 
That sounds like it's going to be difficult to do. What did you do the site in originally? I use Dreamweaver and having the clients use Contribute works out very well...

Steve W
MacBook 2.0 160/2GB/SuperDrive
Lots of older Macs
     
Fresh-Faced Recruit
Join Date: Oct 2003
Location: Nebraska
Status: Offline
Reply With Quote
Jul 4, 2004, 12:01 PM
 
I used Dreamweaver as well, however my employer at the time was a pure Microsoft shop (getting them to purchase Dreamweaver was difficult) and encouraged the client to use Front Page which broke just about everything I did. I wrote some Javascript based spplications that ran in the browser to produce standardized pages but my employer never went to bat for me on that and I was never privy to client meetings. My employer was a GIS company that wanted to add web design but had nobody there that knew it except for me. They never would have shelled out money for Contribute. I kept telling them FP was a toy but they thought Macromedia stuff was the toy.

Anyway i just thought it would be fun and perhaps profitable to cook my own solution if possible. I'm sure there is a way. If anyone has an idea or can point me to another dev forum I can try.
     
Junior Member
Join Date: Mar 2003
Location: Walnut Creek, CA
Status: Offline
Reply With Quote
Jul 21, 2004, 02:31 AM
 
There's two ways to do this:

1. You would need to make it a two part application: a daemon to do all the actual work, and a frontend to interface with the user. The daemon would set the permissions to something unreadable by the rest of the users (I have no idea how you'd protect it from an admin account though, especially since they can sudo) as the files are created.

2. You would need to incorporate something like Pseudo directly into the program; whereas Pseudo (AFAICT) uses an NSTask to launch "sudo open -a /path/to/application.app", you would need to have it su to the separate, password protected user account that would be created on first run. There's still no way to protect it from an administrator however.

As for the rest of the program, I can't help you much, but good luck, and look into using WebCore, as opposed to just WebKit.

Oh, and incidentally, in my experience, Macromedia Contribute is absolutely terrible. Avoid if possible.
I bring order to chaos. You are in chaos windows, you are the contradiction, a bug wishing to be an OS.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:39 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2