1

Closed

Store/Application group attributes

description

Hi Andrea,
 
Kudos for your code, it has been very helpful for me.
I was wandering if there is an easy way to add attributes (key/value) to an application group.
I know i can do that once the group is associated with an Item but i just need a standalone definition of attributes for a group.
 
 
Cheers
 
Avi
Closed Jun 13, 2009 at 8:58 AM by aferende
retired

comments

cmacholz wrote Mar 29, 2009 at 4:01 AM

I was planning on editing the code on my own to add this functionality myself, it would be helpful. I'm using store groups as links to separate (but identical) databases when a uses is added to a store group I'll need to add an Foreign key to that lookup table. By adding attributes to these groups this would add a lot of flexiblity to this project. That's my two cents....but I'm not currently coding it.

wrote Apr 17, 2009 at 5:53 AM

Resolved with changeset 22226.

aferende wrote Apr 17, 2009 at 5:55 AM

** Closed by aferende 4/16/2009 10:53 PM

aferende wrote Apr 17, 2009 at 5:55 AM

closed for ann error. Sorry.

aferende wrote Apr 17, 2009 at 6:03 AM

Hi,
Attributes for Store / Application group could be returned as out parameters while Check Access phase, so why you cannot assign attributes on the Item Authorizations ?
Another way could be to use the "Description" field of a Store/Application Group in a custom way.

Please let me know.

thaiat wrote Apr 21, 2009 at 10:01 AM

I'm not sure I understand your last comment andrea. Is this implemented in the current last version?
To explain better why I think this functionnality could be usefull here is a simple use case:
Let's say i have to 2 different modules in my application, one is Servicedesk , second is SpaceManagement.
I want to be able to restrict users of each module to a specific set of geographical location.
So i could define the following hierarchy using Application Groups:
SpaceManagement module
- Ressource Center world (application group added as a member)
     - Ressource Center FRANCE (application group added as a member) <- here i will add the locations key via attributes to define what location are in FRANCE, and the i will add as a member several users
I would do the same for ServiceDesk module.
Then when a user logs in, i will traverse the Application group hierarchy to see where he is attached, and for each module i will collect the keys of the location drilling up the tree. This will define a filterLocation array of keys for each module, that i can use to filter data.

aferende wrote Apr 21, 2009 at 2:13 PM

Hi,
you could have the same result by creating a first Role (XXXX) with this attribute:
  • Key Name: “Module|Location”
  • Key Value: “Space Management|*” (* means world)
Another Role (YYYY) with this attribute:
  • Key Name: “Module|Location”
  • Key Value: “Space Management|France”
When you call the CheckAccess method these attributes will be returned based on which role the user belong; then you can Split the Key value and complete you access phase.
Let me know.
Regards,
Andrea.