JEvents 3.1 (Free Access)

Permission to usergroup for a category not working

Forum for JEvents 3.1 for Joomla 3.x and 2.5.
Forum rules
When requesting support please follow these steps:

1. Update all JEvents add on's first, via the Joomla! Updater
2. Copy and Paste the JEvents Support Information from the JEvents Control Panel.
3. If you get a 500 error OR white page, enable Maximum Error Reporting in Joomla! Global Config and visit the page again, this should give you a more detailed error and help us provide a prompt response.

Postby patrick1905 » Mon Apr 22, 2013 12:03 pm

Hi,

I have been using your product for a new Joomla website and so far I am very happy with it and the options it provides.

However currently I'm stuck on how to set up the permissions.

My customer is a non-profit organization with different work groups, that have their own section on the website. Members of the different work groups should be able edit the contents, events, documents etc. of their section, but not any other. Most of it is voluntary staff, which is constantly changing; some members may change workgroups thoughout the time or be assigend to more than one workgroup.

Therefore we have set up user groups in Joomla for every workgroup. I will use a simplified version here, for better understanding:

  • Registered
    • Section A
      • Group A1
      • Group A2
    • Section B
      • Group B1
      • Group B2
    • Group C
  • Admin

All content related things (Articles, Media and Events) we have set up categories, that represent the different section and workgroups. For JEvents I have done the same, which would look like the following for our example:

  • Internal
  • Public
    • Section A
      • Section A
        • Group A1
          • Program A1A
          • Program A1B
        • Group A2
      • Section B
        • Group B1
        • Group B2
      • Group C

The JEvents Categories work excelent for calender display and restriction of views. Also in the Next Events module it is working perfect on the program pages.

However, when it comes to assigning editing rights I'm getting into problems. So here is what I did:

We are not using the advanced JEvents ACL option, as we want to set up permission on group leven. As users change often, it would be a to complicated to add, edit, remove etc. every user. Therefore we work with groups thoughout the site.

On Joomla Config level I have granted the Admin right for everything (Creating, Editing, Deleting, Admin Access etc.).

For all others I set up the permission on category level. So for Category Group A1 I have granted all permissions to Workgroup A1, same for A2, B1, B2, C...

For the category internal any user that is registered can create an event. So I granted the rights to registered for that group.

However, they cannot create or edit events. The see the edit icon on events of their category but if they click on the edit link or if they want to create a new event, the revieve an error message that they do not have permission to create or edit the event.
Only the admin can currently create events without trouble.

I cannot see where I went wrong. Can you point me in the right direction?

Thanks,
Patrick
patrick1905
 
Posts: 4
Joined: Mon Apr 22, 2013 11:15 am

Postby carcam » Mon Apr 22, 2013 10:06 pm

Can you please provide your JEvents and Joomla! versions?
¿Sabías que tenemos soporte en español para los miembros del Club de JEvents? ¡ÚNETE AHORA!
User avatar
carcam
Team Staff
 
Posts: 7062
Joined: Wed Aug 06, 2008 7:50 pm
Location: Almería

Postby patrick1905 » Mon Apr 22, 2013 10:29 pm

Hi,
thanks for your fast reply. When posting this it was 3.0.4 (somehow the auto-updater didn't pick up the new version). I now did the update manually, versions are the following:
Code: Select all
Joomla : 2.5.9
component_com_jevents : 3.0.12
module_mod_jevents_cal : 3.0.12
module_mod_jevents_filter : 3.0.12
module_mod_jevents_latest : 3.0.12
module_mod_jevents_legend : 3.0.12
module_mod_jevents_switchview : 3.0.12
plugin_finder_jevents : 3.0.12
plugin_search_eventsearch : 3.0.12

The problem is still there.
patrick1905
 
Posts: 4
Joined: Mon Apr 22, 2013 11:15 am

Postby carcam » Tue Apr 23, 2013 5:51 am

To check simplest case. Does saving events in Internal category work for registered users?
¿Sabías que tenemos soporte en español para los miembros del Club de JEvents? ¡ÚNETE AHORA!
User avatar
carcam
Team Staff
 
Posts: 7062
Joined: Wed Aug 06, 2008 7:50 pm
Location: Almería

Postby Geraint » Tue Apr 23, 2013 8:25 am

Make sure in the JEvents overall config that your group members can create events and then in the categories you should restrict the categories they do NOT have the right to create events in and NOT the other way around,
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
User avatar
Geraint
 
Posts: 42795
Joined: Fri Feb 15, 2008 6:14 pm

Postby patrick1905 » Thu Apr 25, 2013 7:07 am

@carcam: The user only gets the edit button in the event, but could not proceed to edit. If he tries that, or tries to create a new event, he gets an error message tags he does not have the permission and is redirected to the homepage.

@Geraint: Although I was a bit confused about your concept I gave it a try. But my feeling was right: it did bot really solve the issue. Although that makes the Create Event page appear, the members can now only create events of the category "Internal". The other categories are now only accessible for super admins. Also the edit button disappeared from the event detail page.
The deny on Public overwrites the permission for all subgroups (as it should according to Joomla ACL, see http://docs.joomla.org/J2.5:Access_Cont ... sions_Work)
So that is also no resolution for the problem....

From my analysis so far I would say that is a bug in the Edit Event page.
patrick1905
 
Posts: 4
Joined: Mon Apr 22, 2013 11:15 am

Postby patrick1905 » Thu May 30, 2013 4:11 pm

Hi,
as I havn't heard anything from you I did a litte walk-though of component's code.

I found out that the isEventCreator() in the JEVHelper is returning this negative result.

In an earlier version there was a check as I would need it for my setup but this was commented out as "this is too heavy on database queries".

But than when I went though to the called method JEVHelper::getAuthorisedCategories I saw that you actually did something to reduce the database load by caching the result in that method. ("Our own version that caches the results - the Joomla one doesn't!!!")

So I was wondering if it would be able to activate that coding again - maybe dependent of a paramenter in the settings?

In my szenario I would not really decrease the database load anyway, as after isEventCreator found out that user has core.create for com_jevents, it anyway queries for the allowed categories.

I would really appreciate your opinion on my change request.

Best regards,
Patrick
patrick1905
 
Posts: 4
Joined: Mon Apr 22, 2013 11:15 am

Postby Geraint » Fri May 31, 2013 4:14 am

I am at the JandBeyond Joomla conference this weekend and was discussing this issue with a couple of other developers and thought that I should re-visit this aspect of the code.

I'll take a look at this again over the next couple of weeks but if wanted to experiment in the meantime that would be great. The problem we had originally was that to check if the visitor was an event creator was generating 100+ database queries on sites with a moderate number of categories and really putting an excessive burden on the server - caching this specific functionality may well be a good solution.
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
User avatar
Geraint
 
Posts: 42795
Joined: Fri Feb 15, 2008 6:14 pm

Postby broesel » Tue Jul 23, 2013 12:27 am

I have nearly same problem since I changed from joomla 1.5.x to 2.5.x in april this year.
This is my configuration:

Code: Select all
PHP Version : 5.3.21
Joomla : 2.5.11
component_com_jevents : 3.1.2
component_com_jce : 2.3.2.4
module_mod_jevents_cal : 3.1.2
module_mod_jevents_filter : 3.1.2
module_mod_jevents_latest : 3.1.2
module_mod_jevents_legend : 3.1.2
module_mod_jevents_switchview : 3.1.2
layout_extplus : 3.0.1
layout_smartphone : 3.0.3
plugin_finder_jevents : 3.1.2
plugin_jevents_jevcalendar : 3.0.0 (not enabled)
plugin_jevents_jevusers : 3.0.0b
plugin_search_eventsearch : 3.1.2


I set the group-rights correctly, enabled user-authorization, added users, put their rights correctly (only for i.e. one category they are allowed to create, edit, etc. events).
BUT: Error in cause of "not allowed to create events". After I switched user-authorization off, the created user can create, edit, ..., events.
Since I want to restrict the access rights for different groups, I cannot use JEvents any more without having this trouble. Nether, some of the users cannot create or edit or delete their OWN events, nor the public events until I disable user-authorization.

Please help. I tried to uninstall, reinstall several times. Nothing changed. I also bought a silver-club-membership today. But there is another error (on your site) - I cannot access the downloads (I already posted it into the correct thread, but wanted to mention that I'm fully stucked now since April.

Many greetings

Bernd
broesel
Bronze Members
 
Posts: 5
Joined: Sun Oct 23, 2011 8:18 am

Postby Tonyp » Tue Jul 23, 2013 7:18 am

Hello Bernd,

Did you setup the usergroups on the categories or did you actually add the users to the Authorised User List in JEvents when enabled the Authorised user mode?

Regards
Tony
---------------------------------------
Feel free to PM me if you would like Custom Installs or Joomla! related work for a competitive quote.

User avatar
Tonyp
Team Staff
 
Posts: 23639
Joined: Tue Oct 12, 2010 9:12 pm
Location: Isle of Man

Next

Return to JEvents 3.1 (Free Access)

  • Who is online
  • View new posts
  • View unanswered posts
  • In total there is 1 user online :: 1 registered and 0 hidden (based on users active over the past 5 minutes)
  • Most users ever online was 94 on Tue Sep 01, 2009 12:33 am
  • Users browsing this forum: Yahoo [Bot]