Mercurial > pub > Impl
view Lib/IMPL/Security.pm @ 378:2eed076cb944
rewritten IMPL::Resources::Strings + tests
author | cin |
---|---|
date | Wed, 15 Jan 2014 17:20:54 +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__