Jan 21, 2012 at 3:27 AM
Edited Jan 23, 2012 at 8:18 AM
I'm new to Orchard and need to test my understanding so far and hopefully get some advice from you Orchard gurus.
My objective is to implement an 'Image Bank' where the images displayed are filtered by the current user. In other words, you need to be logged on to see your own images and you cannot see anyone else's.
Ideally I'd like to base this on the existing User. I tried adding some Fields to the User Content Type (the name of a ImageGallery) but that crashed the runtime when I tried to add a user (see Issue Tracker). Eventually, I added the Profile Module, and
that seems to provide the functionality I need.
The next part of the puzzle was to provide detailed information about gallery entries. I added a new ContentType: GalleryEntry and added some fields to it. Then I created a List called Gallery that contains GalleryEntries. Good, I can now add Gallery Entries
and display them.
Now I want to restrict the GalleryEntries that are displayed to just the logged on user. If the user is not logged on then they should not be able to see any GalleryEntries. So I make a newRole 'Artist' and set the only permission to 'Access site front-end'.
Now I create a couple of Artists: 'guest' and 'test', and I set one of the GalleryEntries so the Owner is 'test' and the other entry is owned by 'guest'.
Unfortunately, no matter who I log in as I can see all Gallery Entries, regardless of Owner.
I've written a couple of simple modules but I can't say I understand the orchard architecture yet. So it's possible I'm doing this entirely the wrong way! Your patience, guidance and suggestions would be greatly appreciated.