You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"source": "# If you don't want to give google access to drive you can skip this cell\n# and manually set `API_KEY` below.\n\nCOLAB = \"google.colab\" in str(get_ipython())\nif COLAB:\n !pip install colab-env -qU\n from colab_env import envvar_handler\n envvar_handler.envload()\n\nAPI_KEY = os.environ.get(\"LABELBOX_API_KEY\")\nif not os.environ.get(\"LABELBOX_API_KEY\"):\n API_KEY = getpass(\"Please enter your labelbox api key\")\n if COLAB:\n envvar_handler.add_env(\"LABELBOX_API_KEY\", API_KEY)"
47
+
"source": [
48
+
"# If you don't want to give google access to drive you can skip this cell\n",
49
+
"# and manually set `API_KEY` below.\n",
50
+
"\n",
51
+
"COLAB = \"google.colab\" in str(get_ipython())\n",
"source": "# Please provide a dummy email here:\n# Preferrably one you can access. If you have a google account you can do email+1@<domain>.com\nDUMMY_EMAIL = \"< SET THIS >\"\n# This should be set to an account that you wan't to change the permissions for.\n# You could invite a new user, accept the invite and use that account if you don't want to effect any active users\nDUMMY_USER_ACCOUNT_ID = \"ckneh4n8c9qvq0706uwwg5i16\""
92
+
"source": [
93
+
"# Please provide a dummy email here:\n",
94
+
"# Preferrably one you can access. If you have a google account you can do email+1@<domain>.com\n",
95
+
"DUMMY_EMAIL = \"< SET THIS >\"\n",
96
+
"# This should be set to an account that you wan't to change the permissions for.\n",
97
+
"# You could invite a new user, accept the invite and use that account if you don't want to effect any active users\n",
"source": "user = client._get_single(User, DUMMY_USER_ACCOUNT_ID)\n\n# Give the user organization level permissions\nuser.update_org_role(roles[\"LABELER\"])\nprint(user.org_role())\n# Restore project level permissions\nuser.update_org_role(roles[\"NONE\"])\nprint(user.org_role())\n# Make the user a labeler for the current project\nuser.upsert_project_role(project, roles[\"LABELER\"])\nprint(user.org_role())"
0 commit comments