Page tree
Skip to end of metadata
Go to start of metadata

In OX App Suite a Module Access Combination defines which modules a user can access. For OX Cloud, there are 4 predefined Module Access Combinations that an administrator can chose from, when provisioning a user: Webmail + PIM, Add-on Productivity, Add-on  Security, Add-on Productivity & Security.

The following matrix shows which modules are included in the packages:

ModuleMail & PIM
(cloud_pim)
Add-on Productivity
(cloud_productivity)
Add-on Security
(cloud_security)

(cloud_productivity_security)
OX PortalX
OX MailX
OX Address Book  (shared and public)X
OX Calendar (shared and public)X
OX Tasks (shared and public)X
OX Document ViewerX
OX Mail App for different ClientsX
OX Sync (CalDAV/CardDAV, OX Sync App)X
OX Drive (shared and public)
OX Drive App for different platforms
OX Documents
-X

-

OX Guard--X

How do I provision a Module Access Combination?

A module access combination can be provisioned using the changeByModuleAccessName call in the OXResellerContextService (How do I retrieve the Service Definitions?). 

How do I provision a context with a Module Access Combination?

Required parameters

## Context name

$ctxname = "<context_name>"  e.g. testbrand.staging.xion.oxcs.net_context1.com

## Admin credentials

How do I set up admin credentials?

## Quota

$quota = <quota_MB> (-1 = unlimited)

## Admin user

User object with at least the following properties:

  • Name (<admname>)
  • Password (<admpass>)
  • Display name (<adm_display_name>)
  • Surname (<adm_sur_name>)
  • Given name (<adm_given_name>)
  • Primary email address (<adm_primaryEmail>)
  • Email address (<adm_email>)

Sample code (Perl)

## This part is necessary if you are switching to or from a Module Access Combination
## that offers security features (cloud_security and cloud_productivity_security)
my $security_features = SOAP::Data->name(
    "entries" => \SOAP::Data->value(
        SOAP::Data->name( "key"   => "com.openexchange.capability.guard-mail" ),
        SOAP::Data->name( "value" => "true|false" )
    ),
    "entries" => \SOAP::Data->value(
        SOAP::Data->name( "key"   => "com.openexchange.capability.guard-drive" ),
        SOAP::Data->name( "value" => "true|false" )
    )
);

my $context = SOAP::Data->type("Context")->value(
        \SOAP::Data->value(
            SOAP::Data->name( "name"     => $ctxname ),
            SOAP::Data->name( "maxQuota" => $quota ),
            SOAP::Data->name("userAttributes" =>
            	\SOAP::Data->value( 
					SOAP::Data->name( "entries" => \SOAP::Data->value(
                      SOAP::Data->name( "key" => "config" ),
                      SOAP::Data->name( "value" => \SOAP::Data->value($security_features))
                    )
				)
            )
        )
);
 
my $result = $OXResellerContextService->createModuleAccessByName(
        $context,
        SOAP::Data->value("User")->value(
            \SOAP::Data->value(
                SOAP::Data->name( "name"         => "<admname>" ),
                SOAP::Data->name( "password"     => "<admpass>" ),
                SOAP::Data->name( "display_name" => "<adm_display_name>" ),
                SOAP::Data->name( "sur_name"     => "<adm_sur_name>"),
                SOAP::Data->name( "given_name"   => "<adm_given_name>" ),
                SOAP::Data->name( "primaryEmail" => "<adm_primaryEmail>" ),
                SOAP::Data->name( "email1"       => "<adm_email>" )
            )
        ),
		$modaccess,
        $oxaascreds
    );

How do I provision a user with a Module Access Combination?

This guide will show you how to provision a user with a Module Access Combination that differs from the context's Module Access Combination. If your user should have the same as the context, you can also just provision a user with the create call.

Required parameters

## Context id

$context = How do I get a context object for my context?

## User

$user = Object containing the user's login (<user_login>)

## Mod access definition

$modaccess = cloud_pim | cloud_productivity | cloud_security | cloud_productivity_security

## Admin credentials

$oxaascreds = Link to "How to define admin credentials?"

Sample code (Perl)

my @soapdata;
push @soapdata, SOAP::Data->name( "name" => <user_login> )->type('string');

# use code below for unified quota
my $qunified = SOAP::Data->name(
    "entries" => \SOAP::Data->value(
        SOAP::Data->name( "key"   => "com.openexchange.unifiedquota.enabled" ),
        SOAP::Data->name( "value" => "true" )
    )
);
## This part is necessary if you are switching to or from a Module Access Combination
## that offers security features (cloud_security and cloud_productivity_security)
my $security_features = SOAP::Data->name(
    "entries" => \SOAP::Data->value(
        SOAP::Data->name( "key"   => "com.openexchange.capability.guard-mail" ),
        SOAP::Data->name( "value" => "true|false" )
    ),
    "entries" => \SOAP::Data->value(
        SOAP::Data->name( "key"   => "com.openexchange.capability.guard-drive" ),
        SOAP::Data->name( "value" => "true|false" )
    )
);
push @soapdata,
    SOAP::Data->name(
    "userAttributes" => \SOAP::Data->value(
        SOAP::Data->name(
            "entries" => \SOAP::Data->value(
                      SOAP::Data->name( "key" => "config" ),
					  SOAP::Data->name( "value" => \SOAP::Data->value($qunified)),
                      SOAP::Data->name( "value" => \SOAP::Data->value($security_features))
                     )
            )
        )
    );
my $user = SOAP::Data->value("User")->value(
            \SOAP::Data->value(@soapdata)
            ); 
my $result = $OXResellerUserService->createByModuleAccessName(
        $context,
        $user,
        $modaccess,
        $oxaascreds
);

if ( $result->fault() ) {
    print STDERR "Error: ".$result->faultstring()."\n";
    next;
}

# activate unified quota valid for mail and filestorage
$result = $OXaaSService->setMailQuota(
        SOAP::Data->name( "ctxid" => $cid ),
        SOAP::Data->name( "usrid" => $results[0]->{'id'} ),
        SOAP::Data->name( "quota" => $maxQuota ),
        $oxaascreds
);

if ( $result->fault() ) {
    print STDERR "Error: ".$result->faultstring()."\n";
    next;
}
  • No labels