[Anthill-pro] Enhancement: Template permissions / Getting all
Agentusing remote script
emerson cargnin
echofloripa.yell at gmail.com
Thu Jun 19 08:24:33 CDT 2008
Here we have different roles for: developoers, qa, support and live
support, so things are not that easy as you do.
Meanwhile our friends are busy coding this incredible enhancement for
us, could anyone tell me how to get all agents programatically?
thank you
emerson
On 17/06/2008, Peter Steele <psteele at maxiscale.com> wrote:
> Some kind of "apply-to-all" concept or default security template would
> definitely be great. We uniformly set User to have read-only access,
> Build Master to have read/write, and Admin to have read/write/security.
> However, we have to set this every time some new is introduced. Having a
> default security setting would definitely be a nice feature addition.
>
> -----Original Message-----
> From: anthill-pro-bounces at lists.urbancode.com
> [mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of emerson
> cargnin
> Sent: Tuesday, June 17, 2008 2:50 AM
> To: AnthillPro user and support list.; support at urbancode.com
> Subject: [Anthill-pro] Enhancement: Template permissions / Getting all
> Agentusing remote script
>
> It would be great if there was a way to set up a common template for
> permissions. For example, every new element would have a given set of
> permissions that you can especify, you would have a different one for
> each type, like for Agents, Projects, Workflows, etc. It's a real pain
> to have to do it individually to each element, especialy using the
> current GUI interface.
>
> Meanwhile we don't get this fantastic feature.....
> How do I get all agents in a system using remote scripting? Then I
> will use the following to set up the permissions I need, let me know
> if it is the right way:
>
> //setting agent permissions
> String roleName = "User"; // change to the name of the role you
> want to grant permission to
> Role role = RoleFactory.getInstance().restoreForName(roleName);
> Agent[] agents=new Agent[10];
> for (int i = 0; i < agents.length; i++) {
> Resource resource
> =ResourceFactory.getInstance().restoreForPersistent(agents[i]);
> Permission perm = new Permission(true, resource, "read",role);
> perm.store();
> perm = new Permission(true, resource, "write",role);
> perm.store();
> }
>
> Thank you
> emerson
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
More information about the Anthill-pro
mailing list