Media.MakeNew() requires backend User (why not allow Membership.User?)
OK, I should start by stating that I do know the difference between an Umbraco.businesslogic.User (for backoffice) and the System.Web.Security.MembershipUser (for user application login).
I must say that I don't agree with the decision to separate these concepts (user and member), but that's a battle for another post and I'd rather not fight that here...
My main issue is with the Media.MakeNew(). By requiring a BusinessLogic.User, it precludes adding content that a front-end user has contributed to the Media library (or at least preserving the originator of the Media).
The root CMSNode.MakeNew just requires an ID, and the System.Web.Security.MembershipUser has a "ProviderUserKey" that contains the Umbraco Member ID (but not the UserID).
Note that this UserID is not (currently) used in my app (so I am simply attributing everything to the Admin(user 0)). But it would be nice if in the Umbraco backend the Properties "created by" could display the appropriate value.
Is there any way to reconcile these different IDs to allow attribution of content/media to the appropriate Member, without having to rewrite the Umbraco core to standardize on one user provider base?
It's not perfect, but you could setup an additional property on your media type to store the member creators ID, then when you save your media item, set that property to the logged in members ID. Then when it comes to displaying on the front end, just display that property value instead of the default one.
Your media will still belong to admin, but at least you'll have a reference to the member that created it.
Media.MakeNew() requires backend User (why not allow Membership.User?)
OK, I should start by stating that I do know the difference between an Umbraco.businesslogic.User (for backoffice) and the System.Web.Security.MembershipUser (for user application login).
I must say that I don't agree with the decision to separate these concepts (user and member), but that's a battle for another post and I'd rather not fight that here...
My main issue is with the Media.MakeNew(). By requiring a BusinessLogic.User, it precludes adding content that a front-end user has contributed to the Media library (or at least preserving the originator of the Media).
The root CMSNode.MakeNew just requires an ID, and the System.Web.Security.MembershipUser has a "ProviderUserKey" that contains the Umbraco Member ID (but not the UserID).
Note that this UserID is not (currently) used in my app (so I am simply attributing everything to the Admin(user 0)). But it would be nice if in the Umbraco backend the Properties "created by" could display the appropriate value.
Is there any way to reconcile these different IDs to allow attribution of content/media to the appropriate Member, without having to rewrite the Umbraco core to standardize on one user provider base?
Hi Dekker,
It's not perfect, but you could setup an additional property on your media type to store the member creators ID, then when you save your media item, set that property to the logged in members ID. Then when it comes to displaying on the front end, just display that property value instead of the default one.
Your media will still belong to admin, but at least you'll have a reference to the member that created it.
Hope that helps.
Matt
is working on a reply...