Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCC-13, Basic Admin App, mapped user table to AdminUser
- Loading branch information
Showing
34 changed files
with
3,739 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea | ||
var/* | ||
vendor/* | ||
web/bundles/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
backend | ||
======= | ||
|
||
OC Admin Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<IfModule mod_authz_core.c> | ||
Require all denied | ||
</IfModule> | ||
<IfModule !mod_authz_core.c> | ||
Order deny,allow | ||
Deny from all | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache; | ||
|
||
class AppCache extends HttpCache | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
use Mirsch\Bundle\AdminBundle\Kernel\AdminKernel; | ||
|
||
class AppKernel extends AdminKernel | ||
{ | ||
public function registerBundles() | ||
{ | ||
$bundles = [ | ||
new AppBundle\AppBundle(), | ||
]; | ||
|
||
return array_merge(parent::registerBundles(), $bundles); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
admin: | ||
form: | ||
is_admin: 'Admin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
use Doctrine\Common\Annotations\AnnotationRegistry; | ||
use Composer\Autoload\ClassLoader; | ||
|
||
/** @var ClassLoader $loader */ | ||
$loader = require __DIR__.'/../vendor/autoload.php'; | ||
|
||
AnnotationRegistry::registerLoader([$loader, 'loadClass']); | ||
|
||
return $loader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
imports: | ||
- { resource: parameters.yml } | ||
- { resource: security.yml } | ||
- { resource: services.yml } | ||
- { resource: "@MirschAdminBundle/Resources/config/app/config.yml" } | ||
|
||
mirsch_admin: | ||
resources: | ||
admin_user: | ||
entity: 'AppBundle\Entity\AdminUser' | ||
repository: 'AppBundle\Entity\AdminUserRepository' | ||
interface: 'Mirsch\Bundle\AdminBundle\Model\AdminUserInterface' | ||
form: 'AppBundle\Form\AdminUserType' | ||
|
||
twig: | ||
globals: | ||
mirsch_admin_login_box_logo: '<b>Opencaching</b> Admin' | ||
mirsch_admin_page_logo: '<b>OC</b> Admin' | ||
mirsch_admin_page_logo_mini: '<b>OC</b>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
imports: | ||
- { resource: config.yml } | ||
|
||
framework: | ||
router: | ||
resource: "%kernel.root_dir%/config/routing_dev.yml" | ||
strict_requirements: true | ||
session: | ||
# http://symfony.com/doc/current/reference/configuration/framework.html#handler-id | ||
handler_id: session.handler.native_file | ||
save_path: ~ | ||
profiler: { only_exceptions: false } | ||
|
||
web_profiler: | ||
toolbar: true | ||
intercept_redirects: false | ||
|
||
monolog: | ||
handlers: | ||
main: | ||
type: stream | ||
path: "%kernel.logs_dir%/%kernel.environment%.log" | ||
level: debug | ||
channels: [!event] | ||
console: | ||
type: console | ||
channels: [!event, !doctrine] | ||
# uncomment to get logging in your browser | ||
# you may have to allow bigger header sizes in your Web server configuration | ||
#firephp: | ||
# type: firephp | ||
# level: info | ||
#chromephp: | ||
# type: chromephp | ||
# level: info | ||
|
||
#swiftmailer: | ||
# delivery_addresses: ['me@example.com'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
imports: | ||
- { resource: config.yml } | ||
|
||
#doctrine: | ||
# orm: | ||
# metadata_cache_driver: apc | ||
# result_cache_driver: apc | ||
# query_cache_driver: apc | ||
|
||
monolog: | ||
handlers: | ||
main: | ||
type: fingers_crossed | ||
action_level: error | ||
handler: nested | ||
nested: | ||
type: stream | ||
path: "%kernel.logs_dir%/%kernel.environment%.log" | ||
level: debug | ||
console: | ||
type: console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
imports: | ||
- { resource: config_dev.yml } | ||
|
||
framework: | ||
test: ~ | ||
session: | ||
storage_id: session.storage.mock_file | ||
profiler: | ||
collect: false | ||
|
||
web_profiler: | ||
toolbar: false | ||
intercept_redirects: false | ||
|
||
swiftmailer: | ||
disable_delivery: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This file is a "template" of what your parameters.yml file should look like | ||
# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production. | ||
# http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration | ||
parameters: | ||
database_host: 127.0.0.1 | ||
database_port: ~ | ||
database_name: symfony | ||
database_user: root | ||
database_password: ~ | ||
# You should uncomment this if you want use pdo_sqlite | ||
# database_path: "%kernel.root_dir%/data.db3" | ||
|
||
mailer_transport: smtp | ||
mailer_host: 127.0.0.1 | ||
mailer_user: ~ | ||
mailer_password: ~ | ||
|
||
# A secret key that's used to generate certain security-related tokens | ||
secret: ThisTokenIsNotSoSecretChangeIt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mirsch_admin: | ||
resource: "@MirschAdminBundle/Resources/config/routing.yml" | ||
prefix: / | ||
|
||
#app: | ||
# resource: "@AppBundle/Controller/" | ||
# type: annotation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
_wdt: | ||
resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" | ||
prefix: /_wdt | ||
|
||
_profiler: | ||
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" | ||
prefix: /_profiler | ||
|
||
_errors: | ||
resource: "@TwigBundle/Resources/config/routing/errors.xml" | ||
prefix: /_error | ||
|
||
_main: | ||
resource: routing.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
imports: | ||
- { resource: "@MirschAdminBundle/Resources/config/app/security.yml" } | ||
|
||
security: | ||
|
||
providers: | ||
adminuser: | ||
entity: | ||
class: AppBundle:AdminUser | ||
# we have to unset the property so loadUserByUsername() in the repository is used | ||
property: ~ | ||
|
||
encoders: | ||
AppBundle\Entity\AdminUser: bcrypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Learn more about services, parameters and containers at | ||
# http://symfony.com/doc/current/service_container.html | ||
#parameters: | ||
# parameter_name: value | ||
|
||
services: | ||
mirsch.admin.form.admin_user_type: | ||
class: AppBundle\Form\AdminUserType | ||
arguments: ['%mirsch.admin.model.admin_user.entity%', '%mirsch.admin.model.admin_group.entity%'] | ||
tags: | ||
- { name: form.type } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
use Symfony\Component\Console\Input\ArgvInput; | ||
use Symfony\Component\Debug\Debug; | ||
|
||
// if you don't want to setup permissions the proper way, just uncomment the following PHP line | ||
// read http://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup | ||
// for more information | ||
//umask(0000); | ||
|
||
set_time_limit(0); | ||
|
||
/** @var Composer\Autoload\ClassLoader $loader */ | ||
$loader = require __DIR__.'/../app/autoload.php'; | ||
|
||
$input = new ArgvInput(); | ||
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); | ||
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod'; | ||
|
||
if ($debug) { | ||
Debug::enable(); | ||
} | ||
|
||
$kernel = new AppKernel($env, $debug); | ||
$application = new Application($kernel); | ||
$application->run($input); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"name": "vagrant/backend", | ||
"license": "proprietary", | ||
"type": "project", | ||
"autoload": { | ||
"psr-4": { | ||
"": "src/", | ||
"Oc\\": "../htdocs/src/Oc/" | ||
}, | ||
"classmap": [ | ||
"app/AppKernel.php", | ||
"app/AppCache.php" | ||
] | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\": "tests/" | ||
} | ||
}, | ||
"require": { | ||
"mirsch/admin-bundle": "dev-master" | ||
}, | ||
"require-dev": { | ||
"sensio/generator-bundle": "^3.0", | ||
"symfony/phpunit-bridge": "^3.0" | ||
}, | ||
"scripts": { | ||
"symfony-scripts": [ | ||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", | ||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", | ||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", | ||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" | ||
], | ||
"post-install-cmd": [ | ||
"@symfony-scripts" | ||
], | ||
"post-update-cmd": [ | ||
"@symfony-scripts" | ||
] | ||
}, | ||
"extra": { | ||
"symfony-app-dir": "app", | ||
"symfony-bin-dir": "bin", | ||
"symfony-var-dir": "var", | ||
"symfony-web-dir": "web", | ||
"symfony-tests-dir": "tests", | ||
"symfony-assets-install": "relative", | ||
"branch-alias": null | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"config": { | ||
"preferred-install": "dist", | ||
"sort-packages": true | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "git", | ||
"url": "git@github.com:mirsch/admin-bundle.git" | ||
} | ||
] | ||
} |
Oops, something went wrong.