Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-06-10 05:06:16 +0000
committerEike Stepper2012-06-10 05:06:16 +0000
commit3aa06bd3de3bec99de8f70444a6324a7ce705565 (patch)
tree1a47f7bbf856f23b11fd032d11d819d631f9d507 /plugins/org.eclipse.emf.cdo.security.edit/src
parent522e5aa5604404f0db0dbc0318bf7b00b5b46104 (diff)
downloadcdo-3aa06bd3de3bec99de8f70444a6324a7ce705565.tar.gz
cdo-3aa06bd3de3bec99de8f70444a6324a7ce705565.tar.xz
cdo-3aa06bd3de3bec99de8f70444a6324a7ce705565.zip
[380629] Design a default Security model
https://bugs.eclipse.org/bugs/show_bug.cgi?id=380629
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.security.edit/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java20
2 files changed, 39 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java
index b75fc58340..4603773473 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java
@@ -70,6 +70,7 @@ public class RealmItemProvider extends SecurityElementItemProvider implements IE
super.getPropertyDescriptors(object);
addNamePropertyDescriptor(object);
+ addDefaultPermissionPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -92,6 +93,23 @@ public class RealmItemProvider extends SecurityElementItemProvider implements IE
}
/**
+ * This adds a property descriptor for the Default Permission feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDefaultPermissionPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Realm_defaultPermission_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Realm_defaultPermission_feature", "_UI_Realm_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.REALM__DEFAULT_PERMISSION, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
@@ -176,6 +194,7 @@ public class RealmItemProvider extends SecurityElementItemProvider implements IE
switch (notification.getFeatureID(Realm.class))
{
case SecurityPackage.REALM__NAME:
+ case SecurityPackage.REALM__DEFAULT_PERMISSION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case SecurityPackage.REALM__ITEMS:
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java
index d66b443fea..b25747a028 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java
@@ -74,6 +74,7 @@ public class UserItemProvider extends AssigneeItemProvider implements IEditingDo
addFirstNamePropertyDescriptor(object);
addLastNamePropertyDescriptor(object);
addEmailPropertyDescriptor(object);
+ addDefaultPermissionOverridePropertyDescriptor(object);
addLockedPropertyDescriptor(object);
}
return itemPropertyDescriptors;
@@ -163,6 +164,23 @@ public class UserItemProvider extends AssigneeItemProvider implements IEditingDo
}
/**
+ * This adds a property descriptor for the Default Permission Override feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDefaultPermissionOverridePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_User_defaultPermissionOverride_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_User_defaultPermissionOverride_feature", "_UI_User_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.USER__DEFAULT_PERMISSION_OVERRIDE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
* This adds a property descriptor for the Locked feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -267,6 +285,8 @@ public class UserItemProvider extends AssigneeItemProvider implements IEditingDo
case SecurityPackage.USER__FIRST_NAME:
case SecurityPackage.USER__LAST_NAME:
case SecurityPackage.USER__EMAIL:
+ case SecurityPackage.USER__DEFAULT_PERMISSION_OVERRIDE:
+ case SecurityPackage.USER__DEFAULT_PERMISSION:
case SecurityPackage.USER__LOCKED:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;

Back to the top