NOT FINISHED: User Collections

Resolves #23.

Created a collectionService to provide functionality for creating and managing user collections.
You can enforce it in the controller in the code or, preferred, use the Authorize attribute on the method.


- Ian

-- Sent from my iPad

On Sep 9, 2014, at 9:20 AM, "Zach" <notifications@github.com<mailto:notifications@github.com>> wrote:


In Phocalstream_Core/Service/CollectionService.cs:

> +            foreach (var col in collections)
> +            {
> +                string filePath = Path.Combine(collectionPath, col.ContainerID);
> +
> +                if (System.IO.Directory.Exists(filePath))
> +                {
> +                    System.IO.Directory.Delete(filePath, true);
> +                }
> +
> +                CollectionRepository.Delete(col);
> +                Unit.Commit();
> +            }
> +        }
> +
> +        //Do these delete methods need to be secured?
> +        public void DeleteAllUserCollections()


@icotting<https://github.com/icotting> Is there a proper way to 'secure' the delete functionality so someone can't delete searches or collections (beyond only showing the button if the user is in the admin role)?

-
Reply to this email directly or view it on GitHub<https://github.com/icotting/Phocalstream/pull/33/files#r17311366>.