Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [authorization]

The tag has no usage guidance.

1
vote
1answer
29 views

How to setup action access control?

Let's say contract-A has a couple of actions defined. If access to one of the contract-A's action, say action1(), needs to be controlled on account basis, how to do it? For example, only few ...
1
vote
0answers
31 views

How do permissions on deferred transactions work?

I'm playing around with deferred transactions and encountered an oddity. Say, we have a contract deployed on contract, and an account account. contract has contract@eosio.code as part of its active ...
3
votes
0answers
68 views

How to tell if a transaction was initiated by account or contract code

My goal is to get a list of account names of human users of a dApp, from the output of cleos get actions <dApp account name> -j Is there any way to determine, from a transaction's initial ...
3
votes
3answers
81 views

How does one prevent smart contracts from taking all your tokens, when you give them your auth?

Suppose you are a malicious smart contract developer and embedded an inline transaction in your smart contract that calls eosio.token::transfer 100 eos from the caller's account to your account. An ...
0
votes
1answer
85 views

How to link permission to action?

I created a publish permission, and I want to this permission can only execute the publish action in my tweet contract. How to link the permission to the action?
0
votes
2answers
190 views

in the system contract, what is required for require_auth(_self)

In the system contract (eosio_system.cpp) there are some functions which require require_auth( _self ); How is this auth level achieved by the 21 producers?
1
vote
1answer
111 views

Custom permission error 309004/309005

I'm trying to create a custom permission and push an action on my contract, but experience problems with authorization. Alice.acc is the account where the contract is set to. Giveprm is the custom ...
3
votes
2answers
93 views

Trying to re-deploy the contract gives Assert Exception (10)

I am trying to re-deploy the contract by doing: cleos -u http://api.eosnewyork.io set contract gazaomauaaae /eos-master/contracts/some.contract /eos-master/contracts/some.contract/some.contract.wast ...
3
votes
3answers
283 views

Cleos asks for authority in transaction, but authority is in transaction

Edit: Bounty will be opened in 10hrs from writing (can't do it earlier). This question has been edited to meet the depth necessary to trouble-shoot an issue. The bounty will be issued as soon as the ...
1
vote
1answer
56 views

Authorization flow in dapps

How authorization works in EOS dapps? I mean in application layer. For example in a trello like application how we manage to just the participants in the project are able to see the tasks?
0
votes
1answer
96 views

How to do multi authorization?

I have a question, assume an account named user with a permission @active, and is authorized to bob@active and alice@active, if I want to send a transfer action, do I need all the authorization in my ...
4
votes
1answer
83 views

require_auth for custom role

Some of my action require a special role "admin". What is the best way to handle set some user as admin and some action require the users with admin role? (In solidity, I can have a setAdmin() ...
3
votes
1answer
31 views

Conditional behavior based upon auth

Imagine a contract that does not require_auth() but instead has conditional behavior depending upon which auth is present. if (<conditional that checks auth>) { // do stuff given auth from ...
3
votes
1answer
52 views

Require at least one auth from a set of auths

require_auth() asserts that a particular auth is present. How to write a contract that proceeds if and only if at least one of a set of auths is present?
2
votes
1answer
475 views

require_auth differs from the auth check of INLINE_ACTION_SENDER but how?

In a contract action I've got the following: require_auth(from); // NOTICE THIS LINE... INLINE_ACTION_SENDER(contract, transfer)( N(contract), {from, N(active)}, // ... AND THIS LINE. {...