# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

from __future__ import absolute_import
from time import sleep

from selenium.common.exceptions import TimeoutException, NoSuchElementException

from univention.admin import localization

translator = localization.translation('ucs-test-framework')
_ = translator.translate


class AppCenter(object):
    def __init__(self, selenium):
        self.selenium = selenium

    def install_app(self, app):
        # TODO: Make sure the license is activated!
        self.open_app(app)

        self.selenium.click_button(_('Install'))

        try:
            self.selenium.wait_for_text(
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

from univention.admin.layout import Tab, Group
import univention.admin.filter as udm_filter
import univention.admin.syntax as udm_syntax
import univention.admin.mapping as udm_mapping

from univention.admin.localization import translation
from univention.admin.handlers import simpleLdap

import univention.debug

_ = translation('univention.admin.handlers.settings').translate

module = 'settings/umc_operationset'
operations = ('add', 'edit', 'remove', 'search', 'move')
superordinate = 'settings/cn'

childs = 0
short_description = _('Settings: UMC operation set')
long_description = _('List of Operations for UMC')
options = {
	'default': univention.admin.option(
		default=True,
		objectClasses=['top', 'umcOperationSet'],
	),
}
Beispiel #3
0
#
# In the case you use this program under the terms of the GNU AGPL V3,
# the program is provided in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

from univention.admin import localization
from univention.admin import configRegistry

translation = localization.translation('univention/admin')
_ = translation.translate


class base(Exception):
	message = ''


class objectExists(base):
	message = _('Object exists.')


class noObject(base):
	message = _('No such object.')

# -*- coding: utf-8 -*-

from univention.admin import property, option
from univention.admin.syntax import (string, ipProtocol, integer)
from univention.admin.layout import Tab, Group
from univention.admin.filter import (conjunction, expression)
from univention.admin.mapping import (mapping as Mapping, ListToString,
                                      mapRewrite)
from univention.admin.handlers import simpleLdap
from univention.admin.localization import translation

_ = translation('univention.admin.handlers.tests').translate

module = 'tests/ipservice'
operations = ['add', 'edit', 'remove', 'search', 'move']
childs = False
short_description = _('IP Service')
long_description = '/etc/services in LDAP'

options = {
    'default':
    option(
        short_description='IP Service',
        default=True,
        objectClasses=['ipService'],
    ),
}

property_descriptions = {
    'name':
    property(
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

import univention.admin
import univention.admin.mapping as udm_mapping
from univention.admin.handlers import simpleLdap
import univention.admin.syntax as udm_syntax
from univention.admin.localization import translation
from univention.admin.layout import Tab, Group

_ = translation('univention.admin.handlers.uvmm').translate

module = 'uvmm/info'
default_containers = ['cn=Information,cn=Virtual Machine Manager']

childs = False
short_description = _('UVMM: Machine information')
object_name = _('Machine information')
object_name_plural = _('Machine information')
long_description = ''
operations = ['search', 'edit', 'add', 'remove']

options = {
    'default':
    univention.admin.option(default=True,
                            objectClasses=['top', 'univentionVirtualMachine'])
Beispiel #6
0
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

from univention.admin.layout import Tab, Group
import univention.admin.syntax as udm_syntax
import univention.admin.filter as udm_filter
import univention.admin.mapping as udm_mapping

from univention.admin.handlers import simplePolicy
from univention.admin.localization import translation

import univention.debug

_ = translation('univention.admin.handlers.policies').translate


class umcFixedAttributes(udm_syntax.select):
    choices = (('umcPolicyGrantedOperationSet',
                _('Allowed UMC operation sets')), )


module = 'policies/umc'
operations = ('add', 'edit', 'remove', 'search')

policy_oc = 'umcPolicy'
policy_apply_to = ['users/user', 'groups/group']
policy_position_dn_prefix = 'cn=UMC'

childs = 0
Beispiel #7
0
#
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

import univention.admin
import univention.admin.mapping
import univention.admin.filter as udm_filter
from univention.admin.handlers import simpleLdap
import univention.admin.syntax as udm_syntax
from univention.admin.localization import translation
from univention.admin.layout import Tab, Group


_ = translation('univention.admin.handlers.uvmm').translate

module = 'uvmm/profile'
default_containers = ['cn=Profiles,cn=Virtual Machine Manager']

childs = 0
short_description = _('UVMM: Profile')
long_description = ''
operations = ['search', 'edit', 'add', 'remove']


class BootDevice(udm_syntax.select):
	"""Boot device enumeration."""
	name = 'BootDevice'
	choices = [
		('hd', _('hard drive')),
Beispiel #8
0
#
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

import univention.debug as ud

import univention.admin.uexceptions
from univention.admin.hook import simpleHook
from univention.admin.localization import translation
from univention.config_registry import ConfigRegistry

ucr = ConfigRegistry()

translation = translation('univention-admin-handlers-kopano-contact')
_ = translation.translate


class kopano4ucsRole(simpleHook):

    type = 'kopano4ucsRole'

    def __isUsersUser(self, module):
        return 'username' in module.descriptions  # FIXME: this check is wrong and also detects since UCS 4.3 user/contact objects

    def __kopanoRoles(self, module, ml):
        # if role has changed and module is not "settings/usertemplate"
        if self.__isUsersUser(module) and module.hasChanged("kopano-role"):
            ud.debug(
                ud.ADMIN, ud.INFO, 'kopano4ucsRole: role has changed %r' %
Beispiel #9
0
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

from univention.admin.layout import Tab, Group
import univention.admin.filter as udm_filter
import univention.admin.syntax as udm_syntax
import univention.admin.mapping as udm_mapping

from univention.admin.localization import translation
from univention.admin.handlers import simpleLdap

import univention.debug

_ = translation( 'univention.admin.handlers.settings' ).translate

module = 'settings/umc_operationset'
operations = ( 'add', 'edit', 'remove', 'search', 'move' )
superordinate = 'settings/cn'

childs = 0
short_description = _( 'Settings: UMC operation set')
long_description = _( 'List of Operations for UMC' )
options = {}

property_descriptions={
	'name': univention.admin.property(
			short_description=_('Name'),
			long_description=_('Name'),
			syntax=udm_syntax.string,
Beispiel #10
0
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

from univention.admin.layout import Tab, Group
import univention.admin.syntax as udm_syntax
import univention.admin.filter as udm_filter
import univention.admin.mapping as udm_mapping

from univention.admin.handlers import simplePolicy
from  univention.admin.localization import translation

import univention.debug

_ = translation('univention.admin.handlers.policies').translate

class umcFixedAttributes( udm_syntax.select ):
	choices = (
		( 'umcPolicyGrantedOperationSet', _( 'Allowed UMC operation sets' ) ),
		)

module = 'policies/umc'
operations = ( 'add', 'edit', 'remove', 'search' )

policy_oc = 'umcPolicy'
policy_apply_to = [ 'users/user', 'groups/group' ]
policy_position_dn_prefix = 'cn=UMC'

childs = 0
short_description = _( 'Policy: UMC' )