1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

[guest-user] add permission for guest user

disable generate shared link when user's role is GUEST
This commit is contained in:
lian
2015-06-12 16:04:10 +08:00
parent 560a757e68
commit d7cac0d24c
9 changed files with 40 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ define([
var Router = Backbone.Router.extend({
routes: {
'': 'showMyRepos',
'': 'showRepos',
'my-libs/': 'showMyRepos',
'my-libs/lib/:repo_id(/*path)': 'showMyRepoDir',
'my-sub-libs/': 'showMySubRepos',
@@ -61,6 +61,15 @@ define([
}
},
showRepos: function() {
this.switchCurrentView(this.myHomeView);
if (app.pageOptions.can_add_repo) {
this.myHomeView.showMyRepos();
} else {
this.myHomeView.showSharedRepos();
}
},
showMyRepos: function() {
this.switchCurrentView(this.myHomeView);
this.myHomeView.showMyRepos();