Skip to Content Skip to Menu

Tab visible to self and higher ACL

  • AlanJones
  • AlanJones
  • OFFLINE
  • Posts: 509
  • Thanks: 42
  • Karma: 2
10 years 1 month ago #249499 by AlanJones
Tab visible to self and higher ACL was created by AlanJones
Is it possible to make a tab visible to the registered user as well as other users of a higher ACL?
So lets say I have ACL level "Student" and I want each user to see their quiz results but not others of the same level.
And I want those of level "Teacher" to see everyone's quiz result.

CB 1.9.1
J 2.5.24

Own Your Own Community!

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
10 years 1 month ago #249505 by krileon
Replied by krileon on topic Tab visible to self and higher ACL
CB Privacy is probably the only way to do this as it always allows the profile owner to see the tab/fields in addition to whatever privacy settings it's set to. You'd user moderator privacy controls to force a privacy level on the tab/fields. However the moderator tab privacy controls feature is bugged and needs the below quickfix.

www.joomlapolis.com/forum/153-professional-member-support/226433-solved-condition-to-show-based-on-userid-and-userid-of-connections#249003

An alternative could be to use CB Conditional and construct a Custom Value substitute that can give a value to condition against. Example condition as follows.

Field: Value
Value: [cb:if cb_profiletype="Student"]SHOW[/cb:if][cb:if user="#me" cb_profiletype="Teacher"]SHOW[/cb:if]
Operator: Equal To
Value: SHOW

The above would cause the word SHOW to be the value if the displayed user is a student or the viewing user is a teacher. If that matches then it'll display the tab. You can try using the viewaccesslevel IF substitution as well to test view access levels. Example as follows.

Value: [cb:if viewaccesslevel includes "3"]SHOW[/cb:if][cb:if user="#me" viewaccesslevel includes "6"]SHOW[/cb:if]

Note the 3 would be Student and the 6 would be Teacher (you'll need to adjust these, values supplied are just examples).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • AlanJones
  • AlanJones
  • OFFLINE
  • Posts: 509
  • Thanks: 42
  • Karma: 2
10 years 1 month ago #249507 by AlanJones
Replied by AlanJones on topic Tab visible to self and higher ACL
Great. I considered the privacy as an option. But now I have another option.
Thanks Krileon!

Alan

Own Your Own Community!

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum