Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes for new Author type and access #1708

Merged
merged 1 commit into from

2 participants

@designermonkey

Fixes issue raised by @brendo where creating a new Author as a Manager failed with 403

@designermonkey

Reference #1692

@brendo brendo was assigned
@designermonkey designermonkey Fixes for new Author type and access
Add new type to Author Field

Add new type to Author Field
dc0746a
@brendo brendo merged commit 98bb1e7 into symphonycms:integration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 31, 2013
  1. @designermonkey

    Fixes for new Author type and access

    designermonkey authored
    Add new type to Author Field
    
    Add new type to Author Field
This page is out of date. Refresh to see the latest.
View
2  symphony/assets/navigation.xml
@@ -29,7 +29,7 @@
<children>
<item link="/system/authors/" name="Authors" />
<item link="/system/authors/edit/" name="Author Edit" visible="no" />
- <item link="/system/authors/new/" name="Author New" visible="no" limit="developer" />
+ <item link="/system/authors/new/" name="Author New" visible="no" limit="manager" />
<item link="/system/authors/summary/" name="Author Summary" visible="no" />
<item link="/system/preferences/" limit="developer" name="Preferences" />
View
5 symphony/lib/toolkit/class.administrationpage.php
@@ -355,11 +355,11 @@ public function build(array $context = array()){
$this->addStylesheetToHead(APPLICATION_URL . '/assets/css/admin.css', 'screen', 40);
$this->addScriptToHead(APPLICATION_URL . '/assets/js/jquery.js', 50);
-
+
/* For development only */
$this->addScriptToHead(APPLICATION_URL . '/assets/js/jquery.migrate.js', 51);
/* Remove before final release */
-
+
$this->addScriptToHead(APPLICATION_URL . '/assets/js/symphony.js', 60);
$this->addScriptToHead(APPLICATION_URL . '/assets/js/symphony.collapsible.js', 61);
$this->addScriptToHead(APPLICATION_URL . '/assets/js/symphony.orderable.js', 62);
@@ -483,6 +483,7 @@ public function canAccessPage(){
if(
$page_limit == 'author'
or ($page_limit == 'developer' && Administration::instance()->Author->isDeveloper())
+ or ($page_limit == 'manager' && (Administration::instance()->Author->isManager() || Administration::instance()->Author->isDeveloper()))
or ($page_limit == 'primary' && Administration::instance()->Author->isPrimaryAccount())
) {
return true;
View
3  symphony/lib/toolkit/fields/field.author.php
@@ -112,7 +112,7 @@ private static function __parseFilter($value) {
public function findDefaults(array &$settings){
if(!isset($settings['allow_multiple_selection'])) $settings['allow_multiple_selection'] = 'no';
- if(!isset($settings['author_types'])) $settings['author_types'] = array('developer', 'author');
+ if(!isset($settings['author_types'])) $settings['author_types'] = array('developer', 'manager', 'author');
}
public function displaySettingsPanel(XMLElement &$wrapper, $errors = null) {
@@ -125,6 +125,7 @@ public function displaySettingsPanel(XMLElement &$wrapper, $errors = null) {
$types = $this->get('author_types');
$options = array(
array('author', empty($types) ? true : in_array('author', $types), __('Author')),
+ array('manager', empty($types) ? true : in_array('manager', $types), __('Manager')),
array('developer', empty($types) ? true : in_array('developer', $types), __('Developer'))
);
$label->appendChild(
Something went wrong with that request. Please try again.