@Bhathiya :
Yes, That what we expect to do.

@Asanka :
I am not sure how anuruddha planned the implementation. But yes that should
be the way to do it since that how we have done it in other places.

Thanks & Regards
Danushka Fernando
Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729

On Fri, Jan 9, 2015 at 8:12 AM, Asanka Dissanayake <[email protected]> wrote:

> Hi Danushka,
> Please find my comments inline.
>
> On Thu, Jan 8, 2015 at 3:56 PM, Danushka Fernando <[email protected]>
> wrote:
>
>> Hi All
>>
>> @Bhathiya : This is about usability. We cannot let user do something and
>> let it fail and then let know the user that you cannot do this. We need to
>> inform that to user when he try to do it. That's what we are trying to
>> achieve here.
>>
>
> How are you going to verify this. After user clicks Submit ? you gonna
> pass the user name to back end and check whether it is valid. In that case
> trying to add the user and handle the exception has same weight I think. Or
> else if you want to improve the usability what you can do is, get the
> database user names from backned without hashed tenant domain prefix
> during the page loading  and verify it within there . You can write
> validate logic in the "onblur" event of the input field.
>
> Just my two cents .
>
>
>
>> @Anuruddha :
>> However there are few notes. In [1] what Dimuthu mentioned is to use af
>> runtime database data for this.
>>
>> When we use that you need to have full name. One way is to use same logic
>> used by SS in our code to generate the code in our side as well. Downside
>> of this is if SS change this we need to change it in our code as well. Or
>> else we can search using some pattern like this in db.
>> "<given_db_user_name>_%". However in the latter case the regular expression
>> should be carefully selected.
>>
>> @Dimuthu :
>> WDYT?
>>
>> [1] https://wso2.org/jira/browse/APPFAC-2723
>>
>> Thanks & Regards
>> Danushka Fernando
>> Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729
>>
>> On Thu, Jan 8, 2015 at 11:55 PM, Bhathiya Jayasekara <[email protected]>
>> wrote:
>>
>>> Hi Anurudhdha,
>>>
>>> In this use case, why are you trying to check the user existence? Are
>>> you trying to do it before user creation? In that case, you don't have to
>>> check it yourself because create user service will do it internally, and
>>> throw an exception if the user exists. So your try-catch approach is fine.
>>>
>>> Thanks,
>>> Bhathiya
>>>
>>> On Tue, Jan 6, 2015 at 7:19 PM, Anuruddha Premalal <[email protected]>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm working on APPFAC-2723 and there is a requirement to check whether
>>>> a user is already created in storage server.
>>>>
>>>> In RssAdminService there is a method to check whether a database user
>>>> exists.
>>>>
>>>> Issue with this method is, there has a hashed tenant domain value
>>>> appended to the username once we create  a databaseuser, and it requires
>>>> the full name (with the appended value) to check the user existence.
>>>>
>>>> Isn't it the RSSAdmin service responsibility to append the hashed value
>>>> and perform the search?.
>>>>
>>>> For now I can use a try catch block in the jaggery layer and handle the
>>>> duplicate user creation exception.
>>>>
>>>> AppFactory_Resource_DB has this full user name and perform
>>>> isDataBaseuserExist operation. However this method always resurns false
>>>> because we haven't passed the appended hashed value with the username.
>>>>
>>>> Shall we remove this isDataBaseUserExist method from the ResourceManger
>>>> and use try catch approach to check the user existence?
>>>>
>>>> Regards,
>>>> --
>>>> *Anuruddha Premalal*
>>>> Software Eng. | WSO2 Inc.
>>>> Mobile : +94710461070
>>>> Web site : www.regilandvalley.com
>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Bhathiya Jayasekara*
>>> *Software Engineer,*
>>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>>
>>> *Phone: +94715478185 <%2B94715478185>*
>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>>> <http://www.linkedin.com/in/bhathiyaj>*
>>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
>>> *Blog: http://movingaheadblog.blogspot.com
>>> <http://movingaheadblog.blogspot.com/>*
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
>
> *Asanka DissanayakeSoftware Engineer*
> *WSO2 Inc. - lean . enterprise . middleware |  wso2.com <http://wso2.com/>*
>
> *email: [email protected] <[email protected]>,   blog:
> cyberwaadiya.blogspot.com
> <http://cyberwaadiya.blogspot.com>, asankastechtalks.wordpress.com
> <http://asankastechtalks.wordpress.com>  mobile: +94 71 8373821*
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to