Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] How to list a folder content taking into account permissions
icon5.gif  [CDO] How to list a folder content taking into account permissions [message #1062952] Tue, 11 June 2013 14:12 Go to next message
Marc Gil is currently offline Marc GilFriend
Messages: 81
Registered: July 2009
Member
Hi, I'm having problems listing the available resources for a user. The folder structure looks like following:
ROOT
|-> folder1
    |-> folderA
        |-> resourceA1
        |-> resourceA2
    |-> resourceB
    |-> resourceC


The user "User" has WRITE Resource Permission on the pattern "/folder1/folderA.*", so in principle he can list "folderA" contents.

But the fact is that he can't list it, due to he has not permission on "folder1".

There exist any way to indicate that he can list only the contents of "folderA", but not the resources "resourceB" and "resourceC"? The result should be the following:
ROOT
|-> folder1
    |-> folderA
        |-> resourceA1
        |-> resourceA2


Cheers,
Marc
Re: [CDO] How to list a folder content taking into account permissions [message #1062986 is a reply to message #1062952] Tue, 11 June 2013 15:42 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 11.06.2013 16:12, schrieb Marc Gil:
> Hi, I'm having problems listing the available resources for a user. The folder structure looks like following:
>
> ROOT
> |-> folder1
> |-> folderA
> |-> resourceA1
> |-> resourceA2
> |-> resourceB
> |-> resourceC
>
>
> The user "User" has WRITE Resource Permission on the pattern "/folder1/folderA.*", so in principle he can list
> "folderA" contents.
>
> But the fact is that he can't list it, due to he has not permission on "folder1".
Well, he actually can list the contents of folder, but not the contents of folder1. If you set folderA as the input of
your viewer all should be good.

>
> There exist any way to indicate that he can list only the contents of "folderA", but not the resources "resourceB" and
> "resourceC"? The result should be the following:
>
> ROOT
> |-> folder1
> |-> folderA
> |-> resourceA1
> |-> resourceA2
Hmm, maybe the array of path segments could be derived from just accessing folderA. I would have to play with it.

In general you seem to have the problem that we do not support partial permissions on objects, i.e., permissions on
feature subsets. You can't grant access to folder1's name and parent folder, but not to its (child) nodes list.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] How to list a folder content taking into account permissions [message #1062990 is a reply to message #1062986] Tue, 11 June 2013 15:59 Go to previous messageGo to next message
Marc Gil is currently offline Marc GilFriend
Messages: 81
Registered: July 2009
Member
The workaround I'm using now, is to set READ permissions on all the parent folders, and WRITE permission to this folder. But of course it's not a good final solution.

Do you want that I create a bugzilla for that?

Thanks Eike,
Marc
Re: [CDO] How to list a folder content taking into account permissions [message #1062992 is a reply to message #1062990] Tue, 11 June 2013 16:14 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 11.06.2013 17:59, schrieb Marc Gil:
> The workaround I'm using now, is to set READ permissions on all the parent folders, and WRITE permission to this
> folder. But of course it's not a good final solution.
I guess that's what you want to have automated? I can think about it after Kepler...


>
> Do you want that I create a bugzilla for that?
Yes, please submit a feature request.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] How to list a folder content taking into account permissions [message #1063038 is a reply to message #1062992] Tue, 11 June 2013 20:54 Go to previous message
Marc Gil is currently offline Marc GilFriend
Messages: 81
Registered: July 2009
Member
Here is the feature request Eike: https://bugs.eclipse.org/bugs/show_bug.cgi?id=410539

If I understood your question, the workaround I have implemented I think it's not the correct behaviour, cause what I want to get is only WRITE permission on "folderA" resource. Giving READ permission on its parent folder, the user can list/read/open the other resources contained in that folder ("resourceB" and "resourceC").

Cheers,
Marc
Previous Topic:How to access EMF objects into a transaction
Next Topic:creating filter methods in emf code.
Goto Forum:
  


Current Time: Thu Apr 25 12:16:24 GMT 2024

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

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

Back to the top