|
Re: Permissions [message #1063981 is a reply to message #1063937] |
Mon, 17 June 2013 06:46 |
Jeremie Bresson Messages: 1252 Registered: October 2011 |
Senior Member |
|
|
Hi,
Thank you for providing feedback on the tutorial.
I have tried to reproduce it myself. Executing your code snippet in my workspace, I got like you, no minicrm Permission in the permissions arrray:
BundleClassDescriptor[] permissions == [
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.NoAccessPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.DeleteUserBookmarkPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.CopyToClipboardPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.RemoteServiceAccessPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.ReadUserBookmarkPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.PublishUserBookmarkPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.UpdateServiceConfigurationPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.CreateCustomColumnPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.DeleteGlobalBookmarkPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.UpdateGlobalBookmarkPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.UpdateCustomColumnPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.DeleteCustomColumnPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.CreateUserBookmarkPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.UpdateUserBookmarkPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.ReadGlobalBookmarkPermission@org.eclipse.scout.rt.shared],
BundleClassDescriptor[org.eclipse.scout.rt.shared.security.CreateGlobalBookmarkPermission@org.eclipse.scout.rt.shared]
]
The problem is that the new SDK do not create the Permission in a security subpackage. My permissions objects are here:
org.eclipsescout.demo.minicrm.shared.ui.desktop.form.CreateCompanyPermission,
org.eclipsescout.demo.minicrm.shared.ui.desktop.form.ReadCompanyPermission,
org.eclipsescout.demo.minicrm.shared.ui.desktop.form.UpdateCompanyPermission
Side note: In my workspace I do not have any permission for Person (maybe I skipped this step, when I went to the tutorial).
The runtime still assumes that the Permissions are in a security subpackage. See the implementation of
org.eclipse.scout.rt.server.services.common.security.PermissionService#acceptClassName(Bundle, String) :
protected boolean acceptClassName(Bundle bundle, String className) {
return isCandidate(className);
}
And org.eclipse.scout.rt.server.services.common.security.PermissionService#isCandidate(String) :
@Deprecated
protected boolean isCandidate(String className) {
return className.indexOf("Permission") >= 0 && className.indexOf(".security.") >= 0;
}
--------------------------------------------------------
To solve this you can:
1. Move the Permission objects
The full qualified name of the class need to contain ".security.".
2. Register a service implementing IPermissionService
This service should not ignore Permission objects that are not in a security subpackage. (you can extend PermissionService if you want).
Do not hesitate if you need more help.
--------------------------------------------------------
I think we need to file a bug, because the implementation of the default PermissionService is not acceptable. Or we solve this as part of Bug 410625
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03489 seconds