Hi Lakshman, The value of provider in below line refers to the user who is adding the particular asset.
*var provider = rxtManager.getProviderAttribute(type);* The intended behavior is not allowing users to change that provider value other than to the username value of the user who is trying to add the asset. That is why above code overrides the provider value. Also, provider is a required field at the time asset is added to the registry, but since we already have the username of the user who is adding the asset we don't need to make it mandatory in the user request. It might be wrong to have this particular code snippet inside this validate method, if so we can take that out. Thanks! -Ayesha On Thu, Sep 3, 2015 at 5:17 PM, Lakshman Udayakantha <lakshm...@wso2.com> wrote: > I can see some value is assigning to *provider* field rather validating > it in *validateRequiredFeilds* method in publisher/modules/asset-api.js. > This happens in 2.3.4 code version.see below code in that method > > > > > *var provider = rxtManager.getProviderAttribute(type);if(provider && > provider.length >1 && > assetReq.hasOwnProperty('attributes')){assetReq.attributes[provider] = > user.username;}* > > shouldn't this be changed to > > > > > *var provider = rxtManager.getProviderAttribute(type);if(provider && > provider.length >1 && > assetReq.hasOwnProperty('attributes')){validateRequiredFeild(provider, > assetReq);}* > > WDYT? > Thanks > -- > Lakshman Udayakantha > WSO2 Inc. www.wso2.com > lean.enterprise.middleware > Mobile: *0711241005* > > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Ayesha Dissanayaka* Software Engineer, WSO2, Inc : http://wso2.com <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg> 20, Palmgrove Avenue, Colombo 3 E-Mail: aye...@wso2.com <ayshsa...@gmail.com>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev