[open-ils-commits] r9341 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 14 10:42:18 EDT 2008
Author: erickson
Date: 2008-04-14 10:04:20 -0400 (Mon, 14 Apr 2008)
New Revision: 9341
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
added a parallel method for perm_org_set which returns the sub-tree for each of the perm orgs
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2008-04-14 13:51:53 UTC (rev 9340)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2008-04-14 14:04:20 UTC (rev 9341)
@@ -1309,13 +1309,28 @@
}
);
+__PACKAGE__->register_method(
+ method => 'check_user_work_perms',
+ api_name => 'open-ils.actor.user.work_perm.highest_org_tree_set',
+ authoritative => 1,
+ signature => q/
+ @see open-ils.actor.user.work_perm.highest_org_set
+ Returns a list of org trees. The root of each tree
+ is the highest org in the organization hierarchy where the user has the
+ requested permission. Below each tree root is its full tree of descendants.
+ /
+);
+
sub check_user_work_perms {
my($self, $conn, $auth, $perm, $options) = @_;
my $e = new_editor(authtoken=>$auth);
return $e->event unless $e->checkauth;
- return $U->find_highest_work_orgs($e, $perm, $options);
+ my $orglist = $U->find_highest_work_orgs($e, $perm, $options);
+ return $orglist unless $self->api_name =~ /tree/;
+ return get_org_descendants($self, $conn, $orglist);
}
+
__PACKAGE__->register_method(
method => 'check_user_perms4',
api_name => 'open-ils.actor.user.perm.highest_org.batch',
More information about the open-ils-commits
mailing list