Using the Publisher overview_version error and incomplete information displayed - wso2

I am seeing interesting behavior with the WSO2 Publisher for both Governance Registry as well as Enterprise Server when I am using self-defined asset types. There are two items of concern - the one is that I can successfully save an asset type and capture details against it within the Carbon admin console. This works and works well.
However, when I view the asset in the Publisher, only some of the values that has been captured in the admin console are visible. All of the fields (labels) show up, however some are empty. I can however view them successfully in the Admin Console. What I also find interesting is that if I then update the entry in the Publisher and capture new values for the fields that aren't being displayed, I can see the changed values in the Admin Console - so certainly updating from the Publisher is reflected. Once I've done the Publisher update, the values reflect as they've been captured.
The other dilemma is that when I want to capture a new asset from the Publisher itself, I get an error that the asset cannot be created. The error is "Error while creating asset for the request due to overView_version is not provided. Please provide a value for overview_version since it is a required field". I don't have an overview_version field defined within the asset definition. Actually, there is no version information being captured at all as the asset won't go through a version change.
Any idea what could be causing this? I've tried this under both WSO2 GREG (v5.0.0) as well as WSO2 ES (v2.0.0) and both exhibit the same behaviour. At the moment I am using the Admin Console primarily to capture data, however I would prefer to use the Publisher as the dependency graphs are very useful.

I know it may be a bit too late but I believe this is caused by the versionAttribute property defined in the {CARBON_HOME}/repository/deployment/server/jaggeryapps/publisher/extensions/assets/default/asset.js:configure function [1].
Can you try setting this property to an empty string.
[1] https://github.com/wso2/carbon-store/blob/master/apps/publisher/extensions/assets/default/asset.js#L209

This occurs because you haven't indicated that your not using version attribute in your artifact. To overcome the issue please find below code line in asset.js which is located in here(1).
versionAttribute: 'overview_version',
and change it to an empty string like below.
versionAttribute: ' ',
Now you have to restart the carbon server.
(1) - CARBON_HOME/repository/deployment/server/jaggeryapps/publisher/extensions/assets/default/asset.js

Related

WSO2 Identity Server - Get Role's Permissions

refer to this link we integrated CustomPermissionClaimHandler to our server without any errors but still we can't get the permissions of the users... I know how to create custom claims refer to this link and if I follow these 2 links' steps, I can create permission field like a textbox as shown on picture (testClaim and organizationID are examples about that from picture)... I thought that after integrating CustomPermissionClaimHandler I would see permissions like Role field as shown on picture with blue line but still it comes with empty textbox as shown on picture with green line. Is there any way to get the permissions?
EDIT: I can get JWT including my custom claims and if I decode it I see like this (as you see it doesn't contain permissions):
By looking at the JWT response, I can say you have done either or both of the following.
It seems there is a mistake in the guide of configuring the application-authentication extension.
If you have added,
[authentication.framework.extensions]
claim_handler="com.wso2.sample.claim.handler.CustomClaimHandler"
in to the deployment.toml, but you use the jar by building the code, there is a mismatch in the package name. You have to use the following config.
[authentication.framework.extensions]
claim_handler="org.wso2.custom.claim.PermissionClaimHandler"
Because of this configuration issue, your custom handler may not get executed even though that service got activated properly.
If the claim handler is active and the configuration is correct as step one, you might have missed something when mapping the custom claim to an oidc claim / adding it as an OIDC sope / configuring service provider claims

Sitecore Custom profile

Using Sitecore 7.1, we have defined a custom profile with a custom user profile .Net object so that the user's values can be updated in the Security Manager.
In our site, we have a page to display the current user's profile.
If I update a user's details in the Security User Manager, I expect them to be updated on this page. This works fine locally but when we deploy to test (which has separate authoring and delivery servers), the updated details aren't displayed on the page. We have a custom database table that does contain the correct values so I don't know where the incorrect values are coming from (should I be looking at aspnet_Profile table?) ..
We are using IAuthenticationManeger.GetActiveUser().Profile to get the user to display.
Any ideas? Let me know if supplying any other code would help ...
If your are overriding the Sitecore.Security.UserProfile class and using SetCustomProperty method, then yes the values are saved in the aspnet_Profile database. If you update a user profile in a dev environment, you would need to copy those changes to your test environment via serialization or package to see them there.
If you are doing something else, then you may want to post the code for your profile class so we can get a better idea of what is going on.

Blank Attribute Values in wso2 IS

I am using wso2 IS 4.5.0. I recently modified the standard policy editor so as to use a new attribute but the modification doesn't seem to work. Specifically, when I select the attribute and hit Search, the attribute finder returns the message:
No entitlement data finder module is defined for this category
Has anyone an idea on how to resolve this? thanks in advance,
Maria
Yes.... It is the expected behavior with default implementation. Let me explain this further; Attributes are retrieved to this UI page, using an pluggable entitlement data finder modules. These modules can be plugged with WSO2IS. Attribute sources can be from databases, user stores or any... Default implementation is only retrieved roles from WSO2IS user store. But, if you want more to show in this UI, You can do it by extending default implementations. Please find the source fore default implementation from here. This would help you to get some idea.

Liferay web service

I use Liferay 6.1.1-ce-ga2 bundled with Tomcat server and Oracle 10g database.
My goal is to insert some content, as Journal Article, and display them in an Asset Publisher (with a structure and template, already working).
I used JournalArticleServiceSoap.addArticle(...) with the right fields (groupid, structureid, templateid, ...). The contents are "correctly" inserted in the database and I can see them inside web contents from administrator content panel. The contents have also "Approved" as status. This is done by setting:
serviceContext.setWorkflowAction(WorkflowConstants.ACTION_PUBLISH)
However, I can't see the inserted contents displayed with the other contents in the Asset Publisher, until I open it again for edition and click on publish button (even without changing nothing). Then the content is published as expected. The problem is the number of contents. It is about 600 so I can't to this action for each one.
I do not understand what is the matter and how to figure it out? In other words, what do I have to do to make the web-content inserted by web service display automatically in Asset Publisher?
Or, what does the "Publish" do exactly so I can try to reproduce programmatically with SOAP service (or SQL after insertion)?
Thank you in advance for your help.
I've also posted the same question in Liferay' forum: Problem to display JournalArticle inserted by SOAP web service
you can try to log the database accessing from Liferay and see what will be changed after you save article manualy. Herefor set the logging level of hibernate to info or debug.
are you setting serviceContext like this?
ServiceContext serviceContext = new ServiceContext();
serviceContext.setAddGuestPermissions(true);
serviceContext.setAddGroupPermissions(true);
serviceContext.setScopeGroupId(groupId);
serviceContext.setWorkflowAction(WorkflowConstants.ACTION_PUBLISH);
You must setting serviceContext Like This:
ServiceContext serviceContext = new ServiceContext();
//serviceContext.setAddGuestPermissions(true);
//serviceContext.setAddGroupPermissions(true);
serviceContext.setScopeGroupId(groupId);
serviceContext.setWorkflowAction(1);
serviceContext.setIndexingEnabled(true);
serviceContext.setIndexingEnabled(true); is Very Important.
The following code is not must requeired.
serviceContext.setAddGuestPermissions(true);
serviceContext.setAddGroupPermissions(true);

How can I use SharePoint Web Services to determine if a user has a document checked out?

(Note I need a solution for this that works on 2007 and 2010)
We have a desktop application that we are adding Sharepoint Check in and out functionality to using the Web Services.
One issue we are coming up against is determining if the current user (of the desktop app) has a document checked out.
Our current approach is to get information about the document in question via Lists GetListItems call which will return us the ows_CheckoutUser field if the document is checked out.
We then want to compare the name of the check out user to the name of our user.
The problem is the name in ows_CheckoutUser seems to be the display name of the user and not the account name and therefore is not unique and not reliable for this check.
I noticed that ows_CheckoutUser also returns an ID value for the user but I can't seem to find out how to get the ID of my current user so I can compare on that instead.
Does anyone have any thoughts on this? Is this the right way to go about it or is there a better way?
I have thought about trying to run a query via GetListItems that would match on the document name and the checkout user equals my current user to see if I get any results back but I think that would suffer from the same problem.
Or maybe I need to go outside the Web Services and use the author.dll?
Edit
I've started going down the route of using an RPC call to getDocsMetaInfo via the Author.dll FP extension.
This call actually gives you the account name of the user that has the document checked out.
I'd still be interested in a solution using the Web Services however
Not sure what the native reply of sharepoint but I suppose it should be the same as when using the Camelot .NET Connector for SharePoint.
You have a few fields which possibly can hold this info
CheckedOutUserId, ID of the User who has the item Checked Out (Lookup)
IsCheckedoutToLocal, (Lookup)
CheckoutUser, Checked Out To (User)
CheckedOutTitle, Checked Out To (User) -
LinkCheckedOutTitle, Checked Out To (Computed)
It actually is LinkCheckedOutTitle that contain the visual reference to the user who checked the document out. In my case it's listed as trikksdomain\trikks, or if a localadmin checked the doc out its machine\administrator.
Here is a SharePoint 2010 Document Library Column Reference guide. http://www.bendsoft.com/download.php?id=b05c062a401cf8bc221ea5df63cc9570