On 22/07/2009, at 12:41 PM, Chuck Hill wrote:

On Jul 21, 2009, at 8:08 PM, Andrew Lindesay wrote:

Hi Chuck;

Wouldn't it just be one trip at startup?

Ah I thought he was going to check the state of the "property" each time somebody attempts to logs on so he could turn login on and off.

I am not too clear myself on what the requirements are.

Andrew's got it.  This is all I am after:

1. An app (optionally) starts up in a state where non-superuser logins are blocked. 2. A superuser logs in, does any housekeeping, then turns logins on for non-superusers. 3. A superuser might later turn non-superuser logins back off for some reason.

At the moment, I have implemented this by:

1. Properties contains a property indicating the start-up state: acceptLogins=false 2. (A superclass of) Application reads this, stores it in an ivar, and provides acceptLogins() so that DirectAction.loginAction() can decide who to let in. 3. A superuser can change the state with Application.setAcceptLogins(boolean).

This works fine, _except_ that the state needs to persist across scheduled re-starts. I will look at storing the state in the database instead.


--
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to