mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-16 01:47:30 +01:00
Allow embedding of folders and access to folders to anonymous editors with edit_hash/spaceAuth links (#63)
* add subspaces to be listed with edit_hash/spaceAuth authorization * remove dead code from api_helpers.js * add edit_hash authorization for requested space thumbnails * handle /s/:hash links in frontend router * set space_auth via a function, allow passing it to load_space * rename variable in /s/:hash router in backend * hide search, profile, breadcrumb in folders if not logged in, construct links to subspaces differently for anonymous editors
This commit is contained in:
@@ -17,6 +17,21 @@ var SpacedeckRoutes = {
|
||||
}.bind(this)
|
||||
}
|
||||
]);
|
||||
|
||||
this.router.add([
|
||||
{
|
||||
path: "/s/:hash",
|
||||
handler: function(params, on_success) {
|
||||
var parts = params.hash.split("-");
|
||||
if (path.length > 0) {
|
||||
this.load_space(parts.slice(1).join("-"), on_success, null, parts[0]);
|
||||
} else {
|
||||
// FIXME error handling
|
||||
on_success();
|
||||
}
|
||||
}.bind(this)
|
||||
}
|
||||
]);
|
||||
|
||||
this.router.add([
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user