Acl v neonu a implementacia

Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
duskohu
Člen | 778
+
0
-

Caute, viete mi poradit? Mam .neon subor pre kazdy modul zvlast a nacitavam ich:

$configurator ->addConfig(__DIR__ . '/config/config.neon')
              ->addConfig(__DIR__ . '/SystemModule/config/config.neon')
              ->addConfig(__DIR__ . '/CmsModule/config/config.neon')
              ->addConfig(__DIR__ . '/ForumModule/config/config.neon');

a chcel by som do kazdeho .meonu podla modulu umiestnit acl:

acl:
	role:
		admin
		manager
		user
	resource:
		settingsPage
		settingsPage2
	allow: ?

Viete mi poradit ako by sa to dalo realizovat?

hrach
Člen | 1838
+
0
-

Ja mam takto:

		authorizator:
			class:		Nette\Security\Permission
			setup:
				- addRole(guest)
				- addRole(authenticated)
				- addRole(member)
				- addRole(manager)
				- addRole(songManager)
				- addRole(eventManager)
				- addRole(photoManager)
				- addRole(mailingManager)

				- addResource(songs)
				- addResource(events)
				- addResource(photos)
				- addResource(mailing)

				- allow(songManager, songs, ::constant(Nette\Security\Permission::ALL))
				- allow(eventManager, events, ::constant(Nette\Security\Permission::ALL))
				- allow(photoManager, photos, ::constant(Nette\Security\Permission::ALL))
				- allow(mailingManager, mailing, ::constant(Nette\Security\Permission::ALL))
				- allow(manager, ::constant(Nette\Security\Permission::ALL), ::constant(Nette\Security\Permission::ALL))
duskohu
Člen | 778
+
0
-

Toto vyzera fajn, dakujem.

Editoval duskohu (10. 10. 2012 1:29)