[TYPO3-mvc] Only show records of the logged in backend user in list module for extension
Anja Leichsenring
aleichsenring at ab-softlab.de
Fri Jun 27 12:47:25 CEST 2014
Hello Jignesh Prajapati,
I try to give you a hint:
All records in TYPO3 context, when created properly, contain a field
cruser_id. This field holds the uid of the user who created the record
in the first place.
The user is stored in be_users, all the backend groups in be_groups.
By matching this user against the one currently logged into the backend,
you can check whether it is the same.
When it only comes to admin vs. non-admin check, you can ask for the
is_admin setting in the logged in users record.
When you have this information, you can constraint your repository to
only return records with the cruser_id matching the logged in users uid,
or limit the list view accordingly.
Additionally, you might want to have a look into
sysext/fluid/Classes/ViewHelpers/BE/Security for reference. There is a
IfHasRole ViewHelper available, that can help you distunguish between
User Roles and display only what you need.
I hope this helps
Regards Anja
On 27.06.2014 11:55, Jignesh Prajapati wrote:
> Hello Guys,
>
> From many days, i m trying to find the solution of one issue in Typo3
> backend, but did not succeeded in it.
>
> My issue is regarding the permission to show the records of logged in
> backend user in the list module.
>
> Let me explain the scenario here:
>
> I created one extension in Ext-base using Typo3 version 6.2.3 In my
> extension, i created the category list module. Now i have two backend
> users. 1) Admin 2) normal user(Non-admin)
>
> Here Admin can see all the categories created by normal user as well.
> But, normal user should not able to see all the categories added by
> admin or any other backend users. Normal user should only see the
> categories in backend created by himself.
>
> Is there any idea how to achieve this or implement?
>
> Hope for positive feedback from someone as it is really urgent for me.
>
> Thanks,
> Jigs
>
More information about the TYPO3-project-typo3v4mvc
mailing list