[Typo3] TSConfig: change BE usergroup on the fly

Tyler Kraft headhunterxiii at yahoo.ca
Thu May 12 13:06:06 CEST 2005


Two things:

1) her rights are assigned before the page tsconf is looked at, so 
trying to set this in the page tsconfig has no effect.  I could be wrong 
but I also dont think you can use conditionals in page tsconfigs.

2)  tsconfig clearly states that you can not use conditionals in user or 
group tsconfig settigns as they will have no effect.

AFAIK you can only use conditionals in the template setup config.

So both methods you have tried don't work for you.

BUT  Mr Bernard Kraft has written an extesnion that allows you to use 
conditionals in page, user and group tsconfig.  I believe there were a 
few little problems with it that I found and he fixed but that was ages 
ago.  The down side is that it wont allow user or group setups to be 
cached when you log in (if I remember correctly).  Give it a try and see 
what happens, and there is a good manual for it that explains the 
extension fairly well.

hth

tk

Yomo Guiamo wrote:
> Hello,
> 
> I'm trying to do the following:
> 
> I have a user Christine (uid=4) who is member of the groups Author 
> (groupid=7) and Editor (groupid=4).
> The group Editor has more rights than the group Author, actually it's an 
>  extended version of the group Author.
> 
> For a certain page (pageid: 115) where Christine has a DBmount to I want 
> to change the group membership of Christine (from Editor to Author), 
> because I want to change certain values in her Accesslist.  Instead of 
> addressing each single access item, I just want to change the groups she 
> belongs to for that particular page, because that fixes the access list 
> settings at once.
> 
> I've tried various ways and I think it should be resolved via TSConfig. 
> This is what I have so far. I've tried 2 scenario's.
> 
> Scenario 1
> ==========
> Work with Page TSConfig (on the page with id:115).
> On the page with id:115, check if the user=Christine. If so, make her a 
> member of the group Author only(!) instead of both Author and Editor.
> 
> [globalVar = BE_user:user:uid = 4]
>   TCAdefaults.be_users.usergroup = 7
>   # just in case this needs to be updated as well
>   TCAdefaults.be_users.usergroup_cached_list = 7
> [end]
> 
> Unfortunately, this doesn't work if I login as user Christine. I still 
> have the rights of the group Editor on this specific page id:115.
> 
> Scenario 2
> ==========
> Work with User TSConfig (of the user itself with uid:4).
> If the user hits page with id:115, make her a member of the group Author 
> only instead of both groups Author and Editor.
> 
> [globalVar GP:id=115]
>    TCAdefaults.be_users.usergroup = 7
>   # just in case this needs to be updated as well
>   TCAdefaults.be_users.usergroup_cached_list = 7
> [end]
> 
> This doesn't work either. I don't know if it's the syntax of my TSConfig 
> or that my concept isn't the way it should be.
> 
> All suggestions are welcome!
> 
> Thank you,
> Yomo Guiamo



More information about the TYPO3-english mailing list