On a user Dashboard I have two templates in one XMod module instance: Performers and PerformerClaims.
The template “Performers” is a list of Performers that were either added by the User currently logged on, OR have been “Claimed” (and administratively approved) by any other registered user to edit those.
A button on each record in "Performers" is “show admins”. When this is selected, the second template, “PerformerClaims”, lists all users who have “claimed” the Performer (for Performer editing privilege’s). Note, that a PerformerClaim exists for the user that added the Performer and all other approved “claimants”.
For each record on PerformerClaims, the column “master admin” indicates whether or not the user shown in the list should have the ability to edit other PerformerClaims related to the Performed selected. The idea is to have the ability for any particular user or users add/delete/edit other admins for this particular performer.
The behavior I am trying to accomplish: When the user logged on presses the “Show Admins” button in the first template (Performers), show the EDIT button and a few AJAX actions in the second template for all PerformerClaims listed; IF the value of ‘master admin’ column on PerformerClaims for the user logged on is true.
Approached I’ve tried or investigated:
SELECT/Case – I was of course successful in hiding showing buttons/actions for each record on PerformerClaims. If a claimant’s Master Admin value was True the button showed; if False it did not show. But I was unable to show/hide the buttons/actions based on the value of the User logged on. I attempted to use a sub-query in the Select to select the value of the User logged on AS XXXXX and then reference that, but have not been able to make that work. If this is a valid approach, let me know, I can work on the sub-query.
Roles – I thought about created a Role “Performer Claim” and adding that to all claimants/admins. I failed to see how that could be effective as I really the role / not role relative to each Performer/User.
Custom Settings – Did not seem relevant.
I have attached two screens so as to imply workflow.
Am I on the right track by using a sub-query or have I backed myself into a corner with a "less than wonderful" design?
I'd welcome any insight and/or ideas,