multi acl: port /rpost
This commit is contained in:
@@ -219,7 +219,6 @@ class Chat extends \Zotlabs\Web\Controller {
|
|||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$acl = new \Zotlabs\Access\AccessList($channel);
|
$acl = new \Zotlabs\Access\AccessList($channel);
|
||||||
$channel_acl = $acl->get();
|
$channel_acl = $acl->get();
|
||||||
|
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ class Rpost extends \Zotlabs\Web\Controller {
|
|||||||
'nickname' => $channel['channel_address'],
|
'nickname' => $channel['channel_address'],
|
||||||
'lockstate' => (($acl->is_private()) ? 'lock' : 'unlock'),
|
'lockstate' => (($acl->is_private()) ? 'lock' : 'unlock'),
|
||||||
'acl' => populate_acl($channel_acl, true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post'),
|
'acl' => populate_acl($channel_acl, true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post'),
|
||||||
|
'permissions' => $channel_acl,
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => true,
|
'visitor' => true,
|
||||||
'profile_uid' => local_channel(),
|
'profile_uid' => local_channel(),
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ function ACL(backend_url) {
|
|||||||
$(document).on('click','.acl-button-show',that.on_button_show);
|
$(document).on('click','.acl-button-show',that.on_button_show);
|
||||||
$(document).on('click','.acl-button-hide',that.on_button_hide);
|
$(document).on('click','.acl-button-hide',that.on_button_hide);
|
||||||
|
|
||||||
$(document).on('click','.acl-button-hide',that.on_button_hide);
|
|
||||||
|
|
||||||
$("#acl-search").keypress(that.on_search);
|
$("#acl-search").keypress(that.on_search);
|
||||||
|
|
||||||
/* startup! */
|
/* startup! */
|
||||||
@@ -64,7 +62,7 @@ function ACL(backend_url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ACL.prototype.get_form_data = function(event) {
|
ACL.prototype.get_form_data = function(event, form_id) {
|
||||||
|
|
||||||
form_id = $(this).data('form_id');
|
form_id = $(this).data('form_id');
|
||||||
|
|
||||||
@@ -401,5 +399,5 @@ ACL.prototype.populate = function(data) {
|
|||||||
$(el).attr('src', $(el).data("src"));
|
$(el).attr('src', $(el).data("src"));
|
||||||
$(el).removeAttr("data-src");
|
$(el).removeAttr("data-src");
|
||||||
});
|
});
|
||||||
that.update_view();
|
//that.update_view();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="generic-content-wrapper">
|
<div class="generic-content-wrapper">
|
||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
{{if $is_owner}}
|
{{if $is_owner}}
|
||||||
<button type="button" class="btn btn-success btn-xs pull-right" onclick="openClose('chatroom-new');"><i class="fa fa-plus-circle"></i> {{$newroom}}</button>
|
<button type="button" class="btn btn-success btn-xs pull-right acl-form-trigger" onclick="openClose('chatroom-new');" data-form_id="chatroom-new-form"><i class="fa fa-plus-circle"></i> {{$newroom}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<h2>{{$header}}</h2>
|
<h2>{{$header}}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -165,7 +165,7 @@
|
|||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $showacl}}
|
{{if $showacl}}
|
||||||
<button id="dbtn-acl" class="acl-select btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" type="button">
|
<button id="dbtn-acl" class="acl-select btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" type="button" data-form_id="profile-jot-form">
|
||||||
<i id="jot-perms-icon" class="fa fa-{{$lockstate}} jot-icons"></i>{{if $bang}} <i class="fa fa-exclamation jot-icons"></i>{{/if}}
|
<i id="jot-perms-icon" class="fa fa-{{$lockstate}} jot-icons"></i>{{if $bang}} <i class="fa fa-exclamation jot-icons"></i>{{/if}}
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
{{if $editor}}
|
{{if $editor}}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<button id="webpage-create-btn" class="btn btn-xs btn-success" onclick="openClose('webpage-editor');"><i class="fa fa-pencil-square-o"></i> {{$create}}</button>
|
<button id="webpage-create-btn" class="btn btn-xs btn-success acl-form-trigger" onclick="openClose('webpage-editor');" data-form_id="profile-jot-form"><i class="fa fa-pencil-square-o"></i> {{$create}}</button>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<h2>{{$listtitle}}</h2>
|
<h2>{{$listtitle}}</h2>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{{if $showNewWikiButton}}
|
{{if $showNewWikiButton}}
|
||||||
<button class="btn btn-primary btn-xs" onclick="$('#new-page-form-wrapper').hide(); openClose('new-wiki-form-wrapper');">New Wiki</button>
|
<button class="btn btn-primary btn-xs acl-form-trigger" onclick="$('#new-page-form-wrapper').hide(); openClose('new-wiki-form-wrapper');" data-form_id="new-wiki-form">New Wiki</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $showNewPageButton}}
|
{{if $showNewPageButton}}
|
||||||
<button class="btn btn-success btn-xs" onclick="$('#new-wiki-form-wrapper').hide(); openClose('new-page-form-wrapper');">New Page</button>
|
<button class="btn btn-success btn-xs" onclick="$('#new-wiki-form-wrapper').hide(); openClose('new-page-form-wrapper');">New Page</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user