Mercurial > pub > Impl
view Lib/IMPL/Security.pm @ 389:5aff94ba842f
DOM Schema refactoring complete
author | cin |
---|---|
date | Wed, 12 Feb 2014 13:36:24 +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__