From f7eef1757b240fc2fbe904f6a9eec93ee55fb29e Mon Sep 17 00:00:00 2001 From: dantleech Date: Wed, 5 Jun 2013 13:28:11 +0100 Subject: [PATCH 1/3] Confiured PWF admin extension --- app/config/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/config/config.yml b/app/config/config.yml index 3a7388d6..30f6b81c 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -145,6 +145,11 @@ sonata_block: cache: cmf.block.cache.js_async sonata_admin: + extensions: + cmf_core.admin_extension.publish_workflow: + implements: + - Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishWorkflowInterface + templates: # default global templates ajax: SonataAdminBundle::ajax_layout.html.twig From de2b7585467946441642c6e80c2ab984ca29079c Mon Sep 17 00:00:00 2001 From: dantleech Date: Tue, 11 Jun 2013 19:51:37 +0200 Subject: [PATCH 2/3] Changes for pwf extension --- app/config/config.yml | 3 +++ src/Sandbox/MainBundle/DataFixtures/PHPCR/LoadBlogData.php | 1 + 2 files changed, 4 insertions(+) diff --git a/app/config/config.yml b/app/config/config.yml index 30f6b81c..52b0f8f0 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -82,6 +82,9 @@ doctrine_phpcr: - en - de +cmf_core: + role: CAN_VIEW_NON_PUBLISHED + cmf_routing: route_basepath: /cms/routes chain: diff --git a/src/Sandbox/MainBundle/DataFixtures/PHPCR/LoadBlogData.php b/src/Sandbox/MainBundle/DataFixtures/PHPCR/LoadBlogData.php index 4df17e8d..0b720720 100644 --- a/src/Sandbox/MainBundle/DataFixtures/PHPCR/LoadBlogData.php +++ b/src/Sandbox/MainBundle/DataFixtures/PHPCR/LoadBlogData.php @@ -46,6 +46,7 @@ public function load(ObjectManager $dm) $p->setDate(new \DateTime()); $p->setBody($this->getWords()); $p->setBlog($blog); + $p->setPublishable(true); $dm->persist($p); } From 19708694f122132686f8774b96cdaae86af5938e Mon Sep 17 00:00:00 2001 From: dantleech Date: Tue, 11 Jun 2013 19:56:02 +0200 Subject: [PATCH 3/3] Added role to security.yml --- app/config/security.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/security.yml b/app/config/security.yml index 72cb8e76..e61a4f2b 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -7,7 +7,7 @@ security: Symfony\Component\Security\Core\User\User: plaintext role_hierarchy: - ROLE_ADMIN: ROLE_USER + ROLE_ADMIN: ROLE_USER, CAN_VIEW_NON_PUBLISHED ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] providers: @@ -30,4 +30,4 @@ security: # access_control: # - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https } -# - { path: ^/_internal/secure, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 } \ No newline at end of file +# - { path: ^/_internal/secure, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }