Partial fix for #80823: Changed return type of saveLayerByGroup so it returns a map (containing a SUCCESS entry).
Fixed bug: if an error was found retrieving layers, it still tried to return layers, and failed with an NPE.
We handle the case in which the user is not logged.
Merge pull request #69 from luisromangz/8.2-ohiggins-SNAPSHOT

Fixes #80823 and improvements to canAcess method