Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Individual access rights for many resources
[CDO] Individual access rights for many resources [message #1792882] Wed, 25 July 2018 10:55 Go to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 144
Registered: July 2015
Senior Member
We have got a large number of CDOResources for which we need to set individual access rights.

This can be done via the security realm by specifying multiple "resource filter"s.
Now our problem is, that we need to do this for a large number of resources - let's say 10000.

What would be the best way to achieve this?

We were thinking about using a regex filter to handle this large amount of resources. The only problem is, that this does not seem to work "/.*/myresource". The problem seems to be the forward slash after the asterisk has been used. This "/.*myresource" does work, but it would of course also match Xmyresource.

A workaround might be to define an "And Filter" and write every entry into its own "Resource Filter". But this seems kind of bad to me.
Re: [CDO] Individual access rights for many resources [message #1792940 is a reply to message #1792882] Thu, 26 July 2018 08:24 Go to previous messageGo to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 144
Registered: July 2015
Senior Member
Okay, got it: you need to deselect "Include Parents".
Otherwise this:
/.*/resource
will be split up into this:
/.*/resource
/.*


This makes sense for "normal" path filters, but not really for regex. Maybe it should be excluded?
Re: [CDO] Individual access rights for many resources [message #1793013 is a reply to message #1792940] Fri, 27 July 2018 13:32 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Robert,

IIRC the default value for "Include Parents" is false, so you likely changed it to true at some point?

By looking at ResourceFilterImpl.filter() it seems that multiple Matchers can only occur if "Include Parents" is set to true. And in that case the filter() method returns true if any (i.e., the first) Matcher matches.

What do you mean by "Maybe it should be excluded?" ?

Cheers
/Eike


Re: [CDO] Individual access rights for many resources [message #1793055 is a reply to message #1793013] Mon, 30 July 2018 10:31 Go to previous messageGo to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 144
Registered: July 2015
Senior Member
Hi Eike,

during testing, I set the access rights not via code, but with the CDO client in Eclipse. There, the "Include Parents" option is enabled by default.

I see now that there can be situations where the "Include Parents" option makes sense also for regex. E.g. if you specify "/a/b/.*".
In my case it was just confusing, that it would match everything for the regex ".*/test".

So everything is fine as it is, you just need to know how to use it :)...
Re: [CDO] Individual access rights for many resources [message #1793057 is a reply to message #1793055] Mon, 30 July 2018 11:24 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Very good. I agree that the influences of the various filter properties can be confusing. Only more documentation would help :P

In your case you could also try the PatternStyle.ANT with "/*/test" or "/**/test"...


Re: [CDO] Individual access rights for many resources [message #1793059 is a reply to message #1793057] Mon, 30 July 2018 11:27 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Sorry, I wrongly remembered the semantics of org.eclipse.net4j.util.StringUtil.glob(). "**" is not interpreted as multiple path segments!

Previous Topic:[CDO] Inefficient SQL generated for CDORepository inserts/removes
Next Topic:Notification on metamodel changes
Goto Forum:
  


Current Time: Thu Apr 25 06:59:06 GMT 2024

Powered by FUDForum. Page generated in 0.03381 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top