Is there any way by which we can create new roles programmatically in Superset? I have checked the docs but can't find any hooks to create the roles programmatically.
I use Superset as a python library, and got the same problem a few months ago...
first you have to create a Custom Security Manager... to do this i read this tutorial https://programmer.group/tutorial-how-to-integrate-superset-in-your-own-application.html
Essentially you make the call from your superset_config.py file like this
from core_utils.security import CustomSecurityManager
CUSTOM_SECURITY_MANAGER = CustomSecurityManager
In the init method of the CustomSecurityManager() you can make the call to add_role() function... this do the trick
--
SupersetSecurityManager is the object that have available functions to manage user programatically
Sorry for my bad english, this is my first collaboration, hope this helps
Related
What is the most efficient way to update all assets labels per project?
I can list all project resources and their labels with gcloud asset search-all-resources --project=SomeProject. The command also returns the labels for those assets.
Is there something like gcloud asset update-labels?
I'm unfamiliar with the service but, APIs Explorer (Google's definitive service documentation), shows a single list method.
I suspect (!?) that you will need to iterate over all your resource types and update instances of them using any (there may not be) update (PATCH) method that permits label changes for that resource type.
This seems like a reasonable request and you may wish to submit a feature request using Google's issue tracker
gcloud does not seem to have a update-labels command.
You could try the Cloud Resource Manager API. For example, call the REST or Python API: https://cloud.google.com/resource-manager/docs/creating-managing-labels#update-labels
I am doing a tutorial on Google Certified Associate Cloud Engineer 2020, which used to be on Udemy and now is on Cloud Guru. I am watching a video on GCS: Google Cloud Storage.
At one point tutor, while using GCP User Interface, is renaming a file. In the window Rename Object, a great feature shows gsutil equivalent.
This gsutil equivalent is not showing on my GCP User Interface. Is there any option to turn this on, or is this a feature that no longer exists?
I have tried to look at different options in User Interface, but I cannot find the option I am looking for. I have tried to Google this, but most things that come up are more related to gsutil itself rather than User Interface.
Related to your question if you have to activate something to be able to get this feature, the answer is that you don’t have to activate anything as there is no way to activate it because this is a feature from the GCP UI interface that has been changed since the video that you used as a reference was released.
If you want to get the same gsutil command you would be able if you click on move option instead of using rename. This will open another window where you would find the same gsutil command as you found in the image that you shared.
The reason why the same command is present in the move option as it was in the rename is because in the end a rename the same as a move, which is in fact a 2-step process: a copy and a delete, as can be seen in the steps to rename using the REST API as described in the docs.
In the case that you want this feature to be again available on the GCP UI you can always open a Feature Request in the Issue Tracker asking for it.
Rename feature is also available in GCP Console Just Chek following screenshots
Check This :
https://i.stack.imgur.com/b8pyW.png
I'm trying to create multiple projects inside my Organisation. My use case is:
1. I want to make an API call that creates a new project.
2. I want to create a new DialogFlow agent (chatbot).
Dialogflow API looks pretty straightforward. Since it's backend implementation, I am using service accounts to achieve this.
My problem is that when I'm trying to create a service account, it is always scoped to some project. I spent the whole day trying to give that service account all the access that I could find, but it's still giving me a Forbidden error.
Can someone explain to me if this is possible and if so - how should I configure it through the Cloud Console so that I can end up with a service account that creates projects (that can be scoped to some folder/project if it makes it easier)?
If the answer is yes - can I create multiple chatbots in one project? And what type of permissions do I need to achieve that?
Thanks!
I have a question about working with CustomForms. I would like to implement a function/search in SuiteScript that would search for CustomForm by Name instead of ID. Any suggestions?
Not sure I 100% get the problem, but see if this doen't help:
Remove code from email to support case script that sets field "customForm".
Create specific role for user used to create the cases - don't assign a generic role, like "administrator".
In code for script, specify the role you created in #2 for the login/authentication.
Now, you can flip back and forth between forms from the NetSuite UI by making the needed form the default for the role you created in #2.
All other users will be unaffected, and you won't have to modify the script going forward, except if you have new functionality to add to it.
The other option is to always make the script use the standard case form. That way, you'll never really need to change it. The standard form will contain all custom fields and all standard fields. The only thing you would then need to control is the preferred form by role.
You need to do the development in sandbox environment and test it there completely before doing the production deployment. You can ask your support team to stop for few minutes while doing the deployment and then do a quick smoke test if possible.
Does anyone know of any way to export user and role permissions, and then re-import them on another copy of Sitecore?
I've had a search around, and bar writing a bit of code to do this, doesn't appear to be anything immediately available ...
The permissions are actually stored on the items themselves, not the Role or User objects. There are two ways to export the object like Stephen mentioned, perform the export/import on the item you granted/revoked access to, not the role or user.
There are two ways to do this .. you can make a Sitecore package and add them to that, the other way is to use Serialization which will write text files to disk that you can then restore into another sitecore instance.
The choice very much depends on how many users / roles you have to move. If its just a few, you can use a Sitecore package but if you have a lot you will probably want to use serialization to do it.
More info about each topic can be found here..
Serialization Guide
Info on Packages