1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 08:28:11 +00:00

[share] share repo with 'admin' perm: modification

This commit is contained in:
llj
2017-08-30 17:59:14 +08:00
parent 160e0b3027
commit 33266638ef
11 changed files with 76 additions and 40 deletions

View File

@@ -4,7 +4,7 @@ define([
'backbone',
'common',
'app/views/widgets/hl-item-view',
'app/views/share',
'app/views/share'
], function($, _, Backbone, Common, HLItemView, ShareView) {
'use strict';
@@ -16,7 +16,7 @@ define([
events: {
'click .unshare-btn': 'removeShare',
'click .repo-share-btn': 'share',
'click .repo-share-btn': 'share'
},
initialize: function() {
@@ -25,7 +25,9 @@ define([
share: function() {
var options = {
'is_repo_owner': true,
'is_repo_owner': false,
'is_admin': true, // only for shared repo
'is_virtual': false,
'user_perm': 'rw',
'repo_id': this.model.get('id'),
'repo_encrypted': this.model.get('encrypted'),
@@ -33,6 +35,7 @@ define([
'dirent_path': '/',
'obj_name': this.model.get('name')
};
new ShareView(options);
return false;
},