Mercurial > pub > Impl
view Lib/IMPL/Security.pm @ 381:ced5937ff21a
Custom getters/setters support method names in theirs definitions
Initial support for localizable labels in DOM schemas
author | cin |
---|---|
date | Wed, 22 Jan 2014 16:56:10 +0400 |
parents | d5c8b955bf8d |
children |
line wrap: on
line source
package IMPL::Security; use strict; use Carp qw(carp); ##VERSION## require IMPL::Exception; require IMPL::Security::Rule::RoleCheck; use IMPL::require { Principal => 'IMPL::Security::Principal', AbstractContext => 'IMPL::Security::AbstractContext', Context => 'IMPL::Security::Context' }; sub principal { return AbstractContext->current && AbstractContext->current->principal || Principal->nobody; } sub context { AbstractContext->current || Context->nobody; } 1; __END__