mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-07 11:32:16 +00:00
Ensure that already escaped identifiers that are stored in the Database
will not be escaped again on loading, adjusted test to contain some of the original offenders
This commit is contained in:
1 parent
8db23f6d0f
commit
3a65aa40c3
4 files changed
+27
-14
No files matched your search
+2
-2
@@ -16,13 +16,13 @@ import com.sap.sse.security.shared.impl.WildcardPermissionEncoder;
|
||||
|
||||
public class HasPermissionsTest {
|
||||
|
||||
private final static String OBJECT_NAME = " Regatta :2018 ";
|
||||
private final static String OBJECT_NAME = " Regatta :2018///\"@::";
|
||||
private final static String OBJECT_NAME_ENCODED = WildcardPermissionEncoder.encode(OBJECT_NAME);
|
||||
private final static Action READ_ACTION = HasPermissions.DefaultActions.READ;
|
||||
|
||||
@Test
|
||||
public void getQualifiedObjectIdentifierFromTypedObjectIdentifer() {
|
||||
final QualifiedObjectIdentifier q = new QualifiedObjectIdentifierImpl("type/" + OBJECT_NAME);
|
||||
final QualifiedObjectIdentifier q = QualifiedObjectIdentifierImpl.fromDBWithoutEscaping("type/" + OBJECT_NAME);
|
||||
final HasPermissions h = new HasPermissionsImpl("type");
|
||||
final TypeRelativeObjectIdentifier t = new TypeRelativeObjectIdentifier(OBJECT_NAME);
|
||||
assertEquals(q, h.getQualifiedObjectIdentifier(t));
|
||||
|
||||
Reference in new issue
Block a user