Toloka documentation

set_user_restriction

toloka.client.TolokaClient.set_user_restriction | Source code

set_user_restriction(self, user_restriction: UserRestriction)

Closes the performer's access to one or more projects

Parameters Description

Parameters Type Description
user_restriction UserRestriction

To whom and what to prohibit.

Examples:

If performer often makes mistakes, we will restrict access to all our projects.

new_restriction = toloka_client.set_user_restriction(
    toloka.user_restriction.ProjectUserRestriction(
        user_id='1',
        private_comment='Performer often makes mistakes',
        project_id='5'
    )
)