xpert.ivy server: Request a task list, manage substitution, absences and so one is already limited to the appropriate WebApp the requesting user is defined in.

Is there a possibility to request tasks, manage absences etc. for all WebApps by a single admin user (defined in a WebApp) which has access to all the other WebApps on the same system/server?

asked 19.12.2013 at 14:42

Stefan's gravatar image

Stefan
91448
accept rate: 50%

edited 22.01.2014 at 12:11

admin's gravatar image

admin ♦♦
11125

Does this question belong to Xpert.ivy 3.9 or 4/5.x?

(20.12.2013 at 14:29) Reto Weiss ♦♦ Reto%20Weiss's gravatar image

Sorry: This belongs to xpert.ivy 5.x.

With the currently available API, it seems not possible to manage an absence of a person/user applicationwide (or outside a currently session i'm logged in) (the user exists normally only once in a company, so an absence should be valid for all applications this user is created in). And for an admin, it would be nice if there is a possibility to manage also substitutions for users in different applications. I can manage that by accessing the ivy database directly, but I didn't found any way to do that over the API.

(20.12.2013 at 15:28) Stefan Stefan's gravatar image

It is possible but not with a public API.

However, a better solutions may be to have only one application where you deploy multiple different projects (a.k. web application) into. Use roles so that only users that are allowed to work on a web application can do so.

If this is not possible, you can try the following:

To access all applications running on a server you can use the following non public API (it may or will change in future without any notice ...):

import java.util.List;
import java.util.concurrent.Callable;

import ch.ivyteam.ivy.application.ApplicationConfigurationManagerNavigationUtil;
import ch.ivyteam.ivy.application.IApplication;
import ch.ivyteam.ivy.application.IApplicationConfigurationManager;
import ch.ivyteam.ivy.environment.Ivy;
import ch.ivyteam.ivy.security.SecurityManagerFactory;


public class AccessToAllApplications 
{
    public List<IApplication> getAllApplications() throws Exception
    {
        return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<List<IApplication>>(){

            @Override
            public List<IApplication> call() throws Exception 
            {
                return getAllApplicationsAsSystem();
            }});
    }

    protected List<IApplication> getAllApplicationsAsSystem() 
    {
        IApplicationConfigurationManager appConfigManager = ApplicationConfigurationManagerNavigationUtil.getApplicationConfigurationManager(Ivy.request().getApplication());
        return appConfigManager.getApplications();
    }
}

The executeAsSystem method is used to turn off security. If you use it then security has to be ensured by the process developer.

link

answered 20.12.2013 at 17:46

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.6k172450
accept rate: 74%

Thx, your answer is very helpful Rgds, Stefan

(23.12.2013 at 08:52) Stefan Stefan's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×23
×13

Asked: 19.12.2013 at 14:42

Seen: 1,715 times

Last updated: 22.01.2014 at 12:11