Restrict access content item to userID

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Post Reply
Jheroen
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 126
Joined: Thu Sep 08, 2005 4:43 pm
Location: Gendt
Contact:

Restrict access content item to userID

Post by Jheroen » Wed Oct 20, 2021 2:27 pm

Hi all,

Maybe you know what to use: i want to have articles per article connected to a logged in Joomla user (ID). In J4 it's still user groups but not users :(
Met vriendelijke groet,
Jheroen
http://www.joomlapartner.nl, websites - maatwerk - migratie - design - onderhoud
http://www.joomlahostingsupport.nl, Joomla! hosting - chmodvrij - prima support - concurrerende tarieven

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40483
Joined: Sat Apr 05, 2008 9:58 pm

Re: Restrict access content item to userID

Post by Webdongle » Wed Oct 20, 2021 5:30 pm

You would probably need a community type extension for that. Or an extension specifically based on users having their own private area. What would be the purpose you have in mind for users having their own individual private area?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23447
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Restrict access content item to userID

Post by pe7er » Wed Oct 20, 2021 5:32 pm

Access (viewing levels) and Permissions (actions) are both based on User Groups.

If you want to do something with logged in users and the articles they created,
you could display the articles from a user (articles with created_by = logged in user) via Template Overrides
or limit access via content/system plugins.
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

Jheroen
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 126
Joined: Thu Sep 08, 2005 4:43 pm
Location: Gendt
Contact:

Re: Restrict access content item to userID

Post by Jheroen » Thu Oct 21, 2021 7:15 am

Hi all,
it's about a user logging in and only see the content that is exclusively written for that user.
Met vriendelijke groet,
Jheroen
http://www.joomlapartner.nl, websites - maatwerk - migratie - design - onderhoud
http://www.joomlahostingsupport.nl, Joomla! hosting - chmodvrij - prima support - concurrerende tarieven

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23447
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Restrict access content item to userID

Post by pe7er » Thu Oct 21, 2021 8:55 am

I would:
  • create a category "individual content",
  • create articles in that category for each user and set the "Created By" to specific users.
  • create a content plugin that checks the view + category of the items.
    In case the category = "individual content" and view = category then remove all articles and load the articles from that category with the "Created By" = userid of the user.
    And when category = "individual content" and view = article, check if the user is allowed to read it ("Created By" = userid)
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com


Post Reply

Return to “Administration Joomla! 4.x”