A
A
Anatoly Pandorin2014-01-28 15:01:42
Python
Anatoly Pandorin, 2014-01-28 15:01:42

What is trans in functions?

Good time of day, Khabrovites.

class Dataset( object ):
.....
    def get_access_roles( self, trans ):
        roles = []
        for dp in self.actions:
            if dp.action == trans.app.security_agent.permitted_actions.DATASET_ACCESS.action:
                roles.append( dp.role )
        return roles

Actually, tell the noob what is trans ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Lerg, 2014-01-28
@Pandorin

It looks like this is a link to the current request object in the Galaxy Code framework galaxy-central.readthedocs.org/en/latest/index.html

S
ssbb, 2014-01-28
@ssbb

It is worth looking at what is passed to this method when it is used.

K
KPEBETKA, 2014-01-28
@KPEBETKA

Well, actually the argument that is passed to the function. But what exactly this argument carries in itself can be found in the code.
Look for the place where this function is called, perhaps there you will see how and from what your argument is obtained

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question