Skip to content

Commit

Permalink
Users: Add 'publish_events' cap before a user can access their "New E…
Browse files Browse the repository at this point in the history
…vent" page.

See #5.
  • Loading branch information
r-a-y committed Apr 6, 2015
1 parent 946cfd9 commit 097ca53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
'slug' => bpeo_get_events_new_slug(),
'parent_url' => bp_displayed_user_domain() . trailingslashit( $this->slug ),
'parent_slug' => $this->slug,
'user_has_access' => bp_core_can_edit_settings(),
'user_has_access' => bp_core_can_edit_settings() && current_user_can( 'publish_events' ),
'screen_function' => array( $this, 'template_loader' ),
);

Expand Down

0 comments on commit 097ca53

Please sign in to comment.