Granting access to the "Feature this Event" button

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Event Horizon's picture

When I login to Julio as an admin user and click on a calendar event, I see a "Feature this Event" button which allows me to promote this event to the calendar on the front page.

When I login as a user who is just a content creator, that button doesn't appear.

I can see that the button links to something called a "julio_event_feature".

My question is this, how to add access to that button to non admin users?

Cheers,

Simon

Comments

Anybody? All I need is a tip

Event Horizon's picture

Anybody?

All I need is a tip in the right direction and I can take from there myself.

How does a non-admin user get access to the "Feature this Event" button so they can promote a calendar event to the front page?

Cheers,

Simon

permissions for Feature this Event

deodesign's picture

Try having a look at permissions.
There are 2 sets,
1 in organic groups departments,
2 another set under people - permissions

I hope this helps

The frustrating thing is, I

Event Horizon's picture

The frustrating thing is, I can see where the 'Feature this Event' button is defined:

profiles/julio/modules/julio_events/julio_events.features.inc

and where the event permissions are defined:

profiles/julio/modules/julio_events/julio_events.features.user_permission.inc

but no reference anywhere in the code (or in the OG menus that I've looked at) to a 'Feature' permission.

Flag module permissions

bonobo's picture

Featuring is done via the Flag module; accessing the flag perms should do it.

Cheers,

Bill

Flag module permissions

Event Horizon's picture

Featuring is done via the Flag module; accessing the flag perms should do it.

Thanks for this tip. Unfortunately, it hasn't worked.

Here's what I did

  1. Clicked on the Permissions link on the FLAGS module
  2. Permission "Features",
    • Enabled "Manage features" for authenticated users - no luck.
    • Enabled "Administer features" - as above, no luck
  3. "Feature Set"
    • "Administer feature sets" - no luck
  4. "FullCalendar"
    • "Update any FullCalendar event" - no luck
  5. "Flag"
    • "Administer flags" - no luck
    • "Use flag importer" - no luck

(I've now reverted these perms back to the way they were).

Bottom line is this. When creating a Calender Event (or later viewing an event via it's URL, such as "/content/test-entry"), the admin user gets a "Feature this Event" button, the non-admin authenticated user does not.

I hope I'm not missing something obvious, but it seems that this feature cannot be made available to the non-admin user.

Cheers,

Simon

Managed to get this working

Event Horizon's picture

It still astonishes me how hard this is.

All I wanted to do was grant access to the "Feature this Event" button to someone with the "content creator" role.

As I've document above, this feature cannot be granted via the permissions on the FLAGS module.

I had to hack into the julio_event module. So here for anyone else who wants to do this is my hack.

  1. cd profiles/julio/modules/julio_events/
  2. cp julio_events.features.inc julio_events.features.inc.20130912
  3. Change the roles array from this:

    'roles' => array(
    'flag' => array(
    0 => '3',
    ),
    'unflag' => array(
    0 => '3',
    ),
    ),

    to this:

    'roles' => array(
    'flag' => array(
    0 => '3',
    1 => '4',
    ),
    'unflag' => array(
    0 => '3',
    1 => '4',
    ),

    (This allows for the "content creator" role (4) to have access to this feature
    as well as the "administrator" (3) )

  4. Hop into MySQL and:
    delete from flags where name = "julio_event_feature"

  5. Reload the event as the non-admin user, and Viola, you can now feature the damn event...

Julio

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: