mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
add acl for update button in ContractSettings
This commit is contained in:
parent
74e7c9a3d9
commit
a6f09c8f35
@ -11,6 +11,9 @@ import ContractListActions from '../../actions/contract_list_actions';
|
|||||||
import UserStore from '../../stores/user_store';
|
import UserStore from '../../stores/user_store';
|
||||||
import UserActions from '../../actions/user_actions';
|
import UserActions from '../../actions/user_actions';
|
||||||
|
|
||||||
|
import WhitelabelStore from '../../stores/whitelabel_store';
|
||||||
|
import WhitelabelActions from '../../actions/whitelabel_actions';
|
||||||
|
|
||||||
import ActionPanel from '../ascribe_panel/action_panel';
|
import ActionPanel from '../ascribe_panel/action_panel';
|
||||||
import ContractSettingsUpdateButton from './contract_settings_update_button';
|
import ContractSettingsUpdateButton from './contract_settings_update_button';
|
||||||
|
|
||||||
@ -34,12 +37,15 @@ let ContractSettings = React.createClass({
|
|||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
ContractListStore.listen(this.onChange);
|
ContractListStore.listen(this.onChange);
|
||||||
UserStore.listen(this.onChange);
|
UserStore.listen(this.onChange);
|
||||||
|
WhitelabelStore.listen(this.onChange);
|
||||||
|
|
||||||
|
WhitelabelActions.fetchWhitelabel();
|
||||||
UserActions.fetchCurrentUser();
|
UserActions.fetchCurrentUser();
|
||||||
ContractListActions.fetchContractList(true);
|
ContractListActions.fetchContractList(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
WhitelabelStore.unlisten(this.onChange);
|
||||||
UserStore.unlisten(this.onChange);
|
UserStore.unlisten(this.onChange);
|
||||||
ContractListStore.unlisten(this.onChange);
|
ContractListStore.unlisten(this.onChange);
|
||||||
},
|
},
|
||||||
@ -106,7 +112,11 @@ let ContractSettings = React.createClass({
|
|||||||
content={contract.name}
|
content={contract.name}
|
||||||
buttons={
|
buttons={
|
||||||
<div className="pull-right">
|
<div className="pull-right">
|
||||||
<ContractSettingsUpdateButton contract={contract}/>
|
<AclProxy
|
||||||
|
aclObject={this.state.whitelabel}
|
||||||
|
aclName="acl_update_public_contract">
|
||||||
|
<ContractSettingsUpdateButton contract={contract}/>
|
||||||
|
</AclProxy>
|
||||||
<a
|
<a
|
||||||
className="btn btn-default btn-sm margin-left-2px"
|
className="btn btn-default btn-sm margin-left-2px"
|
||||||
href={contract.blob.url_safe}
|
href={contract.blob.url_safe}
|
||||||
@ -144,7 +154,11 @@ let ContractSettings = React.createClass({
|
|||||||
content={contract.name}
|
content={contract.name}
|
||||||
buttons={
|
buttons={
|
||||||
<div className="pull-right">
|
<div className="pull-right">
|
||||||
<ContractSettingsUpdateButton contract={contract} />
|
<AclProxy
|
||||||
|
aclObject={this.state.whitelabel}
|
||||||
|
aclName="acl_update_private_contract">
|
||||||
|
<ContractSettingsUpdateButton contract={contract}/>
|
||||||
|
</AclProxy>
|
||||||
<a
|
<a
|
||||||
className="btn btn-default btn-sm margin-left-2px"
|
className="btn btn-default btn-sm margin-left-2px"
|
||||||
href={contract.blob.url_safe}
|
href={contract.blob.url_safe}
|
||||||
|
Loading…
Reference in New Issue
Block a user