I understand project names can be changed however I don't see any method to change the project ID.
Is this possible using the gcloud shell perhaps if not in the UI?
You cannot change project ID.
You have an option to use a custom domain, e.g. www.myCompany.com, in which case projectID is something that only your internal code needs to know.
Related
For example, I have https://REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/myfunctionname
But I want to have a root link to my function. Something like that:
https://myfunctionname.REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/
How can I get this?
You can't change the URL provided by Cloud Functions, but you can use Firebase Hosting as a proxy to Cloud Functions so you can use a custom domain to access functions deployed to the same project.
https://firebase.google.com/docs/hosting/functions
Currently there is no way to get a different URL from a Cloud Function other than the one automatically generated which will always have the format "https://REGION-PROJECT_ID.cloudfunctions.net/hello_get".
If there was a way to do this, it would need to be defined during ht deployment of the function, and according to the documentation for 'gcloud function deploy', there is no way to specify a way to change the URL generated.
A sitecore newbie here. We have an existing website that's built using Sitecore 8. It's live in our production environment. I recently joined the company and my background is backend .NET development. I have been asked to write a utility module that allows us to remove registered users that meet certain criteria. The website provides the ability for users to register and the registered users are stored in the core database. My initial thought was to go directly against the DB but quickly learned that the data stored is serialized. I also thought about writing a c# console application to do this but it appears that there are a lot of configuration/setup steps to do this and that it's better to do it from a web app. Does anyone have any tips on how I could set up a simple utility web application to connect to an existing Sitecore database? I expect that I will be asked to add more functions/features down the road.
For an admin function like that, I would be tempted to use Sitecore Powershell Extensions: https://marketplace.sitecore.net/en/Modules/Sitecore_PowerShell_console.aspx
The Get-User command can pull users out of the system:
Get-User Documentation
PS master:\> Get-User -Filter "michaellwest#*.com"
Name Domain IsAdministrator IsAuthenticated
---- ------ --------------- ---------------
sitecore\michael sitecore False False
Then you can use Remove-User to delete them: Remove-User Documentation
There are a lot of great resources on how to use SPE, its awesome for stuff like this.
As i understood, the objective is to be able to remove certain users.
The easiest way to do that would be using Sitecore PowerShell module, but for you as a newbie that would not be probably as easy (and you would need to have module installed). With PowerShell module you don't even need to create user interface.
Here is the documentation how to do use Remove-User with PowerShell
If PowerShell option does not work for you, you can use that from the code utilising Sitecore API, so your Delete method would look something like below:
public void DeleteUser(string userName)
{
try
{
Sitecore.Security.Accounts.User user = Sitecore.Security.Accounts.User.FromName(userName, true);
user.Delete();
}
catch (Exception ex)
{
Sitecore.Diagnostics.Log.Error(string.Format("Error in Client.Project.Security.UserMaintenance (DeleteUser): Message: {0}; Source:{1}", ex.Message, ex.Source), this);
}
}
So you would just call this method when iterating usernames to be deleted. Depending on which credentials you would run that code, you may need to wrap it with SecurityDisabler to omit permissions check for delete operation:
using (new SecurityDisabler())
{
// you code to delete here within using block
}
Hope this helps!
Is it a correct assumption to assume that the "/_system" registry path and descendants should not be touched by manually editing?
I'm guessing the only time I would need to add something here would be if I was creating a new WSO2 product, and then I would only manage the registry for this new product through code using the org.wso2.carbon.registry.api classes?
If by manual editing you mean to use the registry resource browser to add remove resources and collections i don't believe there is any thing like "should not be touched" because otherwise the options that are provided in the resource browser will be for nothing. it is possible to add or remove resources.
I've been using django-auth-ldap for a while to auth against a single server (AUTH_LDAP_SERVER_URI in settings.py). There have been some changes in my organization recently, and I now need to be able to check against two different LDAP servers (actually: Active Directory, but I don't think that comes into play here). Unfortunately there is not a single location that has all of the user info I need.
Is there any way I can configure django-auth-ldap to check against more than 1 server? The documentation seems to assume a single server/URI. I'd also entertain ideas outside of django-auth-ldap, but I'd really like to stick with it if possible because it keeps things simple.
You would need to extend the custom auth handler to take an iterable for servers to check against and just step through them.
There is nothing stopping you from checking any number of directories for the information you need - there is no limitation in the underlying libraries.
django-auth-ldap 1.1 (just released) allows you to easily define multiple subclasses of the authentication backend that use different collections of settings. See http://packages.python.org/django-auth-ldap/#multiple-ldap-configs.
Django has its well designed admin site which is normally located at your-site/admin.
The interface is very powerful. However, you have to set permissions if you have multiple users with different rights and you have to modify a lot if the user asks you for very customised features.
So now my questions are:
should I build my own login site to provide website-specific features?
is there any already built package which I can re-use and add my own features into it?
When I need to use (and probably customize) a login application I always use django-registration.
It is a very complete app, I has email activation key and some other interesting features. And if you want to add/modify some new functionality you just have to create a new backend (you can inherit the common behaviour from the default backend.
https://bitbucket.org/ubernostrum/django-registration
https://github.com/nathanborror/django-registration
Hope it helps
You can create User Groups in django-admin to simplify assigning permissions instead of setting permissions to individual users.
Django-admin has a number of limitations, but there is a lot of extensions to manage them.
The app django-userna will take your pain away.
http://django-userena.org/
But personnaly i use Pinax. When i start a project all account (login/password reset/email management etc ...) is built in and i can focus on what makes my project different instead of reinventing all the user management stuff.