• 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: Access Control [was: Digging up a Session object from an EOGenericRecord]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Access Control [was: Digging up a Session object from an EOGenericRecord]


  • Subject: Re: Access Control [was: Digging up a Session object from an EOGenericRecord]
  • From: Riccardo De Menna <email@hidden>
  • Date: Tue, 10 Mar 2009 20:34:21 +0100

Hi,

Well... After reading your RBAC and what Chuck uses, my stuff looks pretty plain. Anyway I was writing this class while posting the original msg of this thread so I decided to share.

It's not even alpha... I've not had the time to even run it twice (I'm serious) so just check the idea, not the code. I fixed some fast JavaDoc comments in the code. ;)

http://rdm.rdm-web.com/jSamples/Privileges.java.html

It's a centralized class to store all privileges in compact BitSets. It's designed with static constructors to fit perfectly in the "Custom" attribute scenario of the wolips entity modeler.

My "User" entity has an attribute like the following:

PNG image




Different classes can define and use their privilege with a static block without any prior knowledge of other privileges. Also classes define their privilege in "their" files and use them there as well. This keeps me from cluttering all my app with references to privileges that might not exist anymore.


I decided to use the static block constructor cause I feel that since the code "relies" on the privileges, defining them in property files paves the road to problems. This also gives me a startup check that privileges don't conflict. I'm not happy of the redundant ID/CODE thing I picked and of the need to manually choose a unique ID, but I can live with it.
After reading Chucks post I think I'll look into ways of making it work seamlessly with KVC.


Any comments/bugs are absolutely welcome. It's a work in progress so I'd love advice from others and as Kieran, I'm curious about how you do it yourself.

rdm
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Access Control [was: Digging up a Session object from an EOGenericRecord]
      • From: Chuck Hill <email@hidden>
References: 
 >Digging up a Session object from an EOGenericRecord (From: Riccardo De Menna <email@hidden>)
 >Re: Digging up a Session object from an EOGenericRecord (From: Riccardo De Menna <email@hidden>)
 >Re: Digging up a Session object from an EOGenericRecord (From: Mike Schrag <email@hidden>)
 >Re: Digging up a Session object from an EOGenericRecord (From: Riccardo De Menna <email@hidden>)
 >Re: Digging up a Session object from an EOGenericRecord (From: Mike Schrag <email@hidden>)
 >Re: Digging up a Session object from an EOGenericRecord (From: Riccardo De Menna <email@hidden>)
 >Re: Digging up a Session object from an EOGenericRecord (From: Mike Schrag <email@hidden>)
 >Re: Digging up a Session object from an EOGenericRecord (From: Kieran Kelleher <email@hidden>)
 >Re: Digging up a Session object from an EOGenericRecord (From: Chuck Hill <email@hidden>)
 >Re: Access Control [was: Digging up a Session object from an EOGenericRecord] (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: build servers finally fully back to life
  • Next by Date: Re: AJAX without Wonder?
  • Previous by thread: Re: Access Control [was: Digging up a Session object from an EOGenericRecord]
  • Next by thread: Re: Access Control [was: Digging up a Session object from an EOGenericRecord]
  • Index(es):
    • Date
    • Thread