-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
package org.argeo.cms.e4.users;
import static org.argeo.api.NodeInstance.WORKGROUP;
import javax.jcr.Session;
import javax.naming.InvalidNameException;
import javax.naming.ldap.LdapName;
-import javax.transaction.UserTransaction;
import org.argeo.api.NodeConstants;
import org.argeo.api.NodeInstance;
import org.argeo.eclipse.ui.parts.LdifUsersTable;
import org.argeo.jcr.JcrUtils;
import org.argeo.naming.LdapAttrs;
+import org.argeo.osgi.transaction.WorkTransaction;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ToolBarManager;
@Override
protected void createUi(Composite parent) {
try {
- groupsSession = repository.login(NodeConstants.SRV);
+ groupsSession = repository.login(NodeConstants.SRV_WORKSPACE);
} catch (RepositoryException e) {
throw new CmsException("Cannot retrieve session", e);
}
userAdminWrapper.notifyListeners(new UserAdminEvent(null, UserAdminEvent.ROLE_CHANGED, myGroup));
} else if (role.getType() == Role.USER) {
// TODO check if the group is already member of this group
- UserTransaction transaction = userAdminWrapper.beginTransactionIfNeeded();
+ WorkTransaction transaction = userAdminWrapper.beginTransactionIfNeeded();
User user = (User) role;
myGroup.addMember(user);
if (UserAdminWrapper.COMMIT_ON_SAVE)