Ticket (Solved)

Opening the Dashboard to regular users - crazy?

I'm in the process of creating a control panel [frontend] for users to hopefully achieve two objectives:

  • Enable a User to upload an Avatar to their profile

  • Have the future ability for a User to upload many photos associated to their profile.

Immediately what springs to mind, is whether or not its possible to reuse the Orchard's Media library picker field to do so in both cases; though this would mean opening/exposing the dashboard to the user.

Then it occurred to me - perhaps a custom role, then somehow disable all sensitive Admin options associated with Orchard is all I need; basically, give limited access to the dashboard and 'bang' - instant control panel? Or, 'bang' could be the site being destroyed equally by doing so - ha?

Is that a crazy idea and should never be entertained -- hence, continue on with creating a frontend control panel - or has anyone done this successfully?

As always, many thanks - Pug

Re: Opening the Dashboard to regular users - crazy?

Like you suspected, it's generally unwise to try to use on the front-end features that were designed for the back-end. Especially when it involves uploading files.

There are examples of modules on the gallery that add avatars to end user profiles, such as http://gallery.orchardproject.net/Packages/Orchard.Module.Piedone.Avatars

Thursday, December 22, 2016 1:07:29 AM bybleroy
  • bleroy
  • Lv. 08 Rookie
  • Total EXP: 527

Re: Opening the Dashboard to regular users - crazy?

Thanks bleroy, I think the Piedone.Avatar hasn't been updated for a while - but i'm sure I could get something to work in 1.10 for avatars - though the concept of multiple photos may require a bit more imagination.

I'm thinking of a way to pass multiple file references from multiple sources [dropbox?] - as in, just store the image location in DB - and have a photo content item created automatically for each photo that I can then have other attributes attached to the photo content item as well [e.g. location, type, etc.]...does anything spring to mind that I could reference and learn from, or does this seem like a 'code, learn, and see' situation? Thanks for your support, very much appreciated - Pug

Thursday, December 22, 2016 1:54:35 AM bypug
  • pug
  • Lv. 04 Rookie
  • Total EXP: 144

Re: Opening the Dashboard to regular users - crazy?

Multiple uploads are now pretty easy to do, and there are some good client-side libraries that can help as well. I'd focus on the security of the system, because you are going to get hacking attempts. Image uploads are primary targets for abuse... Piedone.Avatar should be a good starting point.

Thursday, December 22, 2016 5:58:03 PM bybleroy
  • bleroy
  • Lv. 08 Rookie
  • Total EXP: 527

Re: Opening the Dashboard to regular users - crazy?

Thanks bleroy, it appears ajax / jquery is the way to go to get some form of progress display during upload ;) Many thanks for your support

Thursday, December 22, 2016 11:49:12 PM bypug
  • pug
  • Lv. 04 Rookie
  • Total EXP: 144

Post a reply

You need to be signed in to post a reply.

Sign In