Coder Social home page Coder Social logo

zfcadmin's Introduction

ZfcAdmin Module for Zend Framework

Created by Jurian Sluiman and Martin Shwalbe.

Introduction

ZfcAdmin is a minimal admin interface for generic administrative purposes. It is a common screen with navigation that hides behind authentication and authorization.

Installation

ZfcAdmin is enabled to be installed via composer. Load zf-commons/zfc-admin in your composer.json file. You can specify its version (currently only 0.1.0 is recommended) or use dev-master to load the latest version from master. Enable ZfcAdmin in your application.config.php configuration file.

If you do not want to use composer, clone this project (either as a git submodule or not) into ./vendor/ directory.

Usage

ZfcAdmin allows you to create routes under a single parent "admin" route. You can also use it to enable navigation in your admin layout. Furthermore integration of BjyAuthorize and ZfcRbac is provided.

The complete configuration is flexible, so you can update the zfcadmin parent route, its children, the navigation and all default provided view scripts. Read more in the documentation about usage and customization of ZfcAdmin.

Development

ZfcAdmin is currently under development. The authors feel ZfcAdmin is stable enough for production versions and you can always fix your ZfcAdmin version to a specific tag. Feel free to report bugs in the issue tracker or come by on IRC at the Freenode channel #zftalk.

zfcadmin's People

Contributors

akrabat avatar dustinmoorman avatar evandotpro avatar hounddog avatar rieschl avatar thomasvargiu avatar timdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zfcadmin's Issues

Packagist Add hook

just noticed on packagist that the Service hook for autoupdating on packagist is not enabled. If someone could enable this please.

Write introduction for the README

The goals of ZfcAdmin must be stated clearly in the README. Under false assumptions people might leave ZfcAdmin alone or try to use it with the wrong ideas. The readme must have a clear introduction of why, when and how you should use ZfcAdmin.

Enable RBAC configuration

Just like BjyAuthorize, enable ZfcRbac configuration. Example:

    'zfcrbac' => array(
        'firewall_route' => true,
        'firewalls' => array(
            'ZfcRbac\Firewall\Route' => array(
                'zfcadmin' => array('route' => '^zfcadmin/*', 'roles' => 'admin')
            )
        ),
    ),

Layout doesn't work with namespaced module.config.php in others modules.

When i have another module which i want to set as a child module of ZfcAdmin, the layout doesn't work or better, do not load that.

<?php
//module.config.php

namespace OtherModule;

return array(
    'controllers' => array(
        'factories' => array(
            'Employee\Controller\Employee' => 'Employee\Factory\Employee',
        )
    ),
     'router' => array(
        'routes' => array(
            'zfcadmin' => array(
                'child_routes' => array(
                    'employee' => array(
                        'type' => 'Literal',
                        'options' => array(
                            'route' => '/employee',
                            'defaults' => array(
                                'controller' => 'Employee\Controller\Employee',
                                'action' => 'index',
                            ),
                        ),
                        'may_terminate' => true,
      //............//

output:

it shows only view scripts content of employee.

I need to set a namespaced module.config.php because my doctrine orm mapping does need it.

navigation on readme

i'm testing zfcadmin, and i've see your example :

'navigation' => array( 'admin' => array( 'mynavigation' => array( 'label' => 'My Module', 'route' => 'zfcadmin/myroute', ), ), ),

For me, i'm must write

'navigation' => array( 'admin' => array( 'mynavigation' => array( 'label' => 'My Module', 'route' => 'zfcadmin/mymodule/mychildroute', ), ), ),

It's maybe more understandable no ?

Layout must be possible to be disabled

Sample code:

public function indexAction()
{
    $model = new ViewModel;
    $model->setTerminal(true);

    return $model;
}

This will disable the view and render the layout. Expected result is the layout is disabled and the view is rendered standalone.

Remove translator from ZfcAdmin layout

If you have no i18n installed, Zend\I18n as component available or no translator set up, the ZfcAdmin will fail to render. Remove the helper calls and make the text static. If users need to make it different, they probably override the template anyhow.

403 Forbidden as admin

I got the error 403 as admin. Also when I set to guest.
controller guard and rout guard are enabled. The following guard settings
are in my project:
guard controller: array('controller' => 'zfcadmin', 'roles' => array('admin')),
route guard: array('route' => 'zfcadmin', 'roles' => array('admin')),

Using default ZfcRbac configuration for RBAC

I am not sure if the configuration is actually required or even deprecated:
https://github.com/ZF-Commons/ZfcAdmin/blob/master/config/zfcadmin.global.php#L54-64

At least you will still have to add configuration to ZfcRbac to make the content accessible:

        'guards' => [
            'ZfcRbac\Guard\RouteGuard' => [
                'zfcuser/login' => ['guest'],
                'zfcuser*' => ['user'],
                'zfcadmin*' => ['admin'],
            ]
        ],

These additions are similar to the ones you need when using ZfcUser with ZfcRbac see issue ZF-Commons/zfc-rbac#221.

Consider `zfcadmin` for `ZfcAdmin\Controller\AdminController`

When using ZfcRbac, I was able to guard the controllers zfcuser and zfcuseradmin, but when I wanted to guard zfcadmin (which doesn't exist), I had to dig up ZfcAdmin\Controller\AdminController. Not complicated, but it'd be nice to provide a uniform naming scheme across Zfc* modules.

Make docs better

Some features are not really documented or documented in such way novice users cannot understand it. Several features can be highlighted better. Possibly the complete docs must be in a docs/ directory and the README only shows some simple options and links to the docs files for more information.

Bootstrap 3

Maybe the module can be updated to use a newer version of bootstrap?

Point all assets to a CDN version

The layout should look "OK" by default without the need to copy assets to a public webroot. Since bootstrap, html5 shiv and jquery are available through CDN versions, these links must be updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.