I do not see a method with the java library to delete an alias from a user. Is there a way to do this? I tried using setAliases with a null value.
I encountered the problem earlier.
I have to call Directory.Users.Aliases.Delete:
Directory.Users.Aliases requestAliases = service.users().aliases();
Directory.Users.Aliases.Delete deleteAlias = requestAliases.delete(yourId, yourAlias);
deleteAlias.execute();
Related
I want to set the CalendarDetail property of CalendarSharing object.
Found the below link where we can set it using Outlook Object Model - https://learn.microsoft.com/en-us/office/vba/api/outlook.calendarsharing
I have written the below code in my C++ add-in. Where can not see the method GetCalendarExporter(), its missing :( I am calling it on Olk::MAPIFolderPtr.
What is wrong here? How to set the above property?
CComPtr<Olk::_NameSpace> spNameSpace;
GetMapiNameSpace((LPVOID *)&spNameSpace);
Olk::MAPIFolderPtr calendarFolder = spNameSpace->GetDefaultFolder(Olk::OlDefaultFolders::olFolderCalendar);
calendarFolder->GetCalendarExporter() **// Not able to see this method**
That means you have old headers. Recreate the Outlook Object Model tlh file.
Is there a way to change the identifier of a project, without directly editing the database?
There is no obvious option to change it in the WebUI.
Apparently this has been an "issue" for a while:
https://www.redmine.org/boards/2/topics/2918?r=48986
Project identifiers are clearly not meant to be modified. It appears that the expectation is that one should delete a project and re-create it with the new identifier. Since this is unacceptable to me, I found a way around it.
The web interface does not allow for changing the identifier and there are a few roadblocks in the Project class itself that prevents one from just opening a console and running something like this (which, as a Rails developer, I would expect to be able to do):
p = Project.find_by(identifier: 'old-identifier')
p.identifier = 'new-identifier'
p.save
However, I have found that one can do this from a production console:
p = Project.where(identifier: 'old-identifier').first
p.instance_eval { self['identifier'] = 'new-identifier' }
p.save
Note: To access a "production console"...
cd into [R]edmine install directory, then run RAILS_ENV=production rails console
(Thanks, Dave)
I'm using the Java client library for the Directory API from here: https://developers.google.com/api-client-library/java/apis/admin/directory_v1
I have insert user and insert group working fine, but for some reason when I try to insert a member, it doesn't work. There is no exception thrown. Here is the code:
Member member = new Member();
member.setEmail("someemail#mydomain.com");
member.setRole("MEMBER");
//member.setKind("admin#directory#member"); not sure if I need this. tried with and without
member.setType("USER"); // docs say "MEMBER" but doesn't seem true. Tried both
client.members().insert(myGroupId, member);
You don't need to set kind nor type.
After "client.members().insert(myGroupId, member);" do you call execute ?
I am using Sitecore Glass Mapper for a new project I'm setting up.
We are using Sitecore 7.2, latest version of Team Development for Sitecore (TDS) code generation and the latest version of glass.
The code I am trying to execute:
var b = new SitecoreContext();
var c = b.GetCurrentItem<T01_Homepage>();
b is not null. c is null.
var d = b.GetItem<T01_Homepage>("path")
d is null.
I added my assembly in GlassMapperScCustom:
public static IConfigurationLoader[] GlassLoaders(){
var attributes = new AttributeConfigurationLoader(new[] { "Company.Framework.Websites.Corporate", "Company.Framework.Core", "Company.Framework.Common" });
return new IConfigurationLoader[] { attributes };
}
When I look into b.GlassContext.TypeConfigurations all my models are there.
I figured it could be a language issue because the site is in dutch and maybe the wrong language would be resolved incorrectly. This was also not the case.
I disabled WebActivator and added the GlassMapperSc.Start() in my Global.asax Application_Start method.
We are also using Autofac as DI framework. But without it, it still isn't working as you can see above. Also when I create my own custom models without TDS code generation the result of GetCurrentItem<T> is null.
Does anyone have an idea how I can fix this?
Did you check your Sites.config and the default language for this website? There could be a difference between the language which is defined in your Sitecore languages folder and your configuration.
I had a similar problem with one of my projects where I changed the Sitecore.Context.Language to "nl" instead of "nl-NL". The glass mapper will return null, but Sitecore.Context.Database.GetItem will return an object in this case.
Most of the times it is a language issue. The mapper returns a null object when you do not have versions in the current or given language.
What can be confusing is that Sitecore.Context.Database.GetItem returns an object, even if it does not have a version in the current language. Be sure to check that item.Versions has any.
Some things you may try (this didn't fit in the comments field)
1) Confirm that the related fields in the Sitecore Item object contain values (so Sitecore.Context.Item for your "c" var and Sitecore.Context.Database.GetItem("path") for your "d" var)
2) Try to encapsulate the GetItem/GetCurrentItem call in a VersionCountDisabler, like this:
T01_Homepage model = null;
using (new VersionCountDisabler())
{
var context = new SitecoreContext();
model = context.GetItem<T01_Homepage>("path");
}
// Do you have data in model now?
3) Try to encapsulate the same call with a SecurityDisabler. Just to confirm it's not a security issue.
4) If you still don't know what it is, please update your question with some (simplified) code for your model.
I am trying to use SVNKit to get a Log of the SVN Entries in Coldfusion. I downloaded the latest SVNKit jar files and threw them in the lib folder under WEB-INF/lib.
Here is my code that should return an Array Of Log Entries but this code is returning a Null Pointer exception in Coldfusion 9.0.2.
SVNURL = createObject('java','org.tmatesoft.svn.core.SVNURL').parseURIEncoded(svnurl);
drf = createObject("java","org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory");
drf.setup();
rf = drf.create(SVNURL);
SVNWCUtil = createObject("java","org.tmatesoft.svn.core.wc.SVNWCUtil");
authManager = SVNWCUtil.createDefaultAuthenticationManager(user,pass);
rf.setAuthenticationManager(authManager);
log = rf.log(JavaCast("String[]",[]),JavaCast("null",""),JavaCast("long",10),JavaCast("long",15),true,true);
rf.closeSession();
When running this code, I receive the following Error.
The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Null Pointers are another name for undefined values.
Which points to this line..
log = rf.log(JavaCast("String[]",[]),JavaCast("null",""),JavaCast("long",10),JavaCast("long",15),true,true);
I moved this same code over to Railo, and everything is running fine. I just cannot see why ACF is choking on the log() method.
I was using the Printing Out Repository History example on the SVNKit Wiki to start me off.
Any suggestions on getting it to work in Adobe Coldfusion would be greatly appreciated. I did not test on CF10.
I wasn't using the JavaCast("boolean",true) for the last two arguments in the log() function. After that, everything worked fine.
Got to remember to check and use JavaCast()!
log = rf.log(JavaCast("String[]",[]),JavaCast("null",""),JavaCast("long",10),JavaCast("long",15),JavaCast("boolean",true),JavaCast("boolean",true));