Struct open_block_ei_open_roles_near_core::OpenRolesContract [−][src]
pub struct OpenRolesContract {
pub account_id: AccountId,
}
Fields
account_id: AccountId
Implementations
Returns the code version of this OpenRoles instance
Return Value
This function returns: String with code version
Returns the id of this instance which was set on creation
Return Value
This function returns : String with id as set by the administrator
pub fn is_allowed(
&self,
contract_account_id: String,
contract_name: String,
operation: String,
user_account_id: String
) -> PendingContractTx
pub fn is_allowed(
&self,
contract_account_id: String,
contract_name: String,
operation: String,
user_account_id: String
) -> PendingContractTx
Checks whether the given on chain ‘user_account_id’ is allowed to access the stated operation (function)
This operation provides the implementation for [\or_structs::TOpenRoles]
Return Value
This function returns: ‘i32’ : value equal to self.affirmative if and only if the user is listed as allowed to access the operation (default = 1)
Checks whether the given on chain ‘user_account_id’ is barred from access the stated operation (function)
This operation provides the implementation for [\or_structs::TOpenRoles]
Return Value
This function returns: ‘i32’ : value equal to self.affirmative if and only if the user is listed as barred to access the operation (default = 1)
pub fn is_registered(
&self,
contract_account_id: String,
contract_name: String
) -> PendingContractTx
pub fn is_registered(
&self,
contract_account_id: String,
contract_name: String
) -> PendingContractTx
Checks whether the given DependentContract is registered under the given concract_account_id
This operation provides the implementation for [\or_structs::TOpenRoles]
Return Value
This function returns: ‘bool’ : true if and only if the contract is registered according to the given details
pub fn assign_list_to_operation(
&self,
contract_account_id: String,
contract_name: String,
operation: String,
list_name: String
) -> PendingContractTx
pub fn assign_list_to_operation(
&self,
contract_account_id: String,
contract_name: String,
operation: String,
list_name: String
) -> PendingContractTx
Assigns the given list to the given operation on the given contract deployed at the given NEAR account id
Administrator Only function
Return Value
This function returns: String otherwise panics
pub fn remove_list_from_operation(
&self,
contract_account_id: String,
contract_name: String,
operation: String
) -> PendingContractTx
pub fn remove_list_from_operation(
&self,
contract_account_id: String,
contract_name: String,
operation: String
) -> PendingContractTx
Removes the given list from the given operation on the given contract deployed on the given NEAR account id
Administrator Only function
Return Value
Creates the given list with ACTIVE status
Administrator Only function
Return Value
This function returns String otherwise panics
Deletes the given list from those available by setting the list status to DELETED
Administrator Only function
Return Value
This function returns String otherwise panics
pub fn add_account_id_to_list(
&self,
user_account_id: String,
list_name: String
) -> PendingContractTx
pub fn add_account_id_to_list(
&self,
user_account_id: String,
list_name: String
) -> PendingContractTx
Adds a NEAR blockchain user_account_id to the given list_name from those available
Administrator Only function
Return Value
This function returns String otherwise panics
pub fn remove_account_from_list(
&self,
user_account_id: String,
list_name: String
) -> PendingContractTx
pub fn remove_account_from_list(
&self,
user_account_id: String,
list_name: String
) -> PendingContractTx
Removes the given NEAR blockchain user_account_id from the given list
Administrator Only function
Return Value
This function returns String otherwise panics
pub fn register_contract(
&self,
contract_account_id: String,
contract_name: String,
ops: Vec<String>
) -> PendingContractTx
pub fn register_contract(
&self,
contract_account_id: String,
contract_name: String,
ops: Vec<String>
) -> PendingContractTx
Registers the given contract as deployed on the given contract_account_id with the given operations
Administrator Only function
Return Value
This function returns String otherwise panics
pub fn deregister_contract(
&self,
contract_account_id: String,
contract_name: String
) -> PendingContractTx
pub fn deregister_contract(
&self,
contract_account_id: String,
contract_name: String
) -> PendingContractTx
Deregisters the given NEAR contract deployed at the given NEAR blockchain contract_account_id
Administrator Only function
Return Value
This function returns String otherwise panics
Provides a list of list_names currently held by this instance. This will include names of DELETED lists
Administrator Only function
Return Value
This function returns String otherwise panics
Provides a view of the list consisting of the name, type, NEAR account ids held and status of the list
Administrator Only function
Return Value
This function returns a tuple otherwise panics
Provides a view of the currently assigned role administrator for this instance
Administrator Only function
Return Value
This function returns a String otherwise panics
Sets the role administrator for this instance MUST be set after deployment
Administrator Only function
Return Value
This function returns a String otherwise panics
Sets the id for this instance MUST be set after deployment
Administrator Only function
Return Value
true if the instance ‘id’ is set
Sets the affirmative code for this instance MUST be set after deployment
Administrator Only function
Return Value
This function rturns a String message
Sets the negative code for this instance MUST be set after deployment
Administrator Only function
Return Value
This function rturns a String message
Creates a default instance of the OpenRoles contract
Creates a new instance of the OpenRoles contract