Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
ReviseMetadata - user is not authorized
geronimo
Hi,
I'm trying to script the update of metadata values. As a starting point, I used the VB Script functions in the includes folder of the Web Client; Process_MetaData and related.
I have made sure that the user I log into MediaBin with has full control on the containers that contain the assets, and that the Metadata values can be changed.
Still, I recieve "The user is not authorized for the action or access to the object", when the code reaches the ReviseMetadata bit.
So I added some debugging code, to check wether the asset is updating, locked and if the current user can change. It's not updating, nor locked, and the user can indeed change the asset.
Next I checked the metadata definition's CanChange property; Also returns true.
So now I'm a bit puzzled at what else can block the ReviseMetadata method.
Mediabin version used: 4.6
Any idea's anyone?
Dries
Find more posts tagged with
Comments
msrinivas
Can you make the userid that you are using part of MBPAdmins group and see if you still have the issue?
Are you checking for deleted items container in your code and skipping any processing for that container?
geronimo
The user is part of MBPAdmins, has full control on the containers that hold the assets that I try to update metadata from, and is even in the local windows Administrators group (which also has full control).
I'm specifying the asset uid's in my code, and the deleted items container is skipped.
I just now checked account rights again using the MediaBin Permission Manager tool and noticed a strange thing when I clicked the Generate Report button; "The value passed in is not valid for the parameter".
Perhaps this is related? However, I can update permissions for single containers, but when I want to include subfolders (checkbox) I get the same error.
It doesn't say which parameter or which value is not valid, so I'm even more puzzled now...
msrinivas
Please post your code.
geronimo
Attached are 2 files (remove the ".txt" from filenames);
1. The script itself (import-metadata.vbs)
2. My source file (metadata-Powerpoint.in)
I stripped the customer specific info.
Most code in the vbs is reused from the asp and inc files in the mediabin web client. It's also in that part of the code that I get the authorisation error; the ReviseMetadata call on line 486
msrinivas
Try changing line 486 to:
objRepoItem.ReviseMetadata colMetadata, Nothing
Also, for further debugging you might want to print out the permissions on the container/asset before you start any manipulation on it.
HTH
geronimo
I had already tried that, no change, still the same problem.
Right before I do the ReviseMetadata, I check the CanChange property on the object. This returns true, but still the actual statement returns the authorisation error.
Also; the user I run the script with and logon to the mediabin session with, has full control over all containers, and is part of the MBPAdmins group.
It looks as though it will turn out being a manual job.
Unless there's another way of migrating metadata from one mediabin server to another?
msrinivas
Please post some debugging capture that you have done.
What do you mean when you say migrating metadata from one mediabin server to another? Why do you have to migrate? There might be an easier way to do that.
geronimo
Found it;
I had a mistake in the declaration of the colMetadata parameter; I had set it to the asset metadata collection, in stead of creating a new empty collection.
geronimo
Just to elaborate on what I was trying to do;
I have 2 mediabin servers with different assets, and certain custom metadata fields. The client now wanted to migrate part of the assets mbserver 1, to mbserver 2, including permissions and metadata.
This meant merging an export from mb1 into mb2, without overwriting any existing assets. And then setting the custom metadata fields and permissions on the assets imported.
I had assets and their permissions covered. Only with the metadata did I run into some problems.
scgv.zip