Re: [Dev] Patch for kernel. - chunk02 release.
Applied the patch.. Sameera. On Sat, Sep 14, 2013 at 6:06 PM, Ajith Vitharana aji...@wso2.com wrote: Attaching image, On Sat, Sep 14, 2013 at 6:05 PM, Ajith Vitharana aji...@wso2.com wrote: Hi Prabath, On Sat, Sep 14, 2013 at 9:03 AM, Prabath Siriwardena prab...@wso2.comwrote: Hi Ajith, Can you please explain the code in the patch.. +// This is for fixing REGISTRY-1911 +try { +if (userName == null CurrentSession.getUser() != null + !CurrentSession.getUser().equals(CarbonConstants.REGISTRY_SYSTEM_USERNAME)) { +UserRealm realm = CurrentSession.getUserRealm(); +UserStoreManager reader = realm.getUserStoreManager(); +String[] roles = reader.getRoleListOfUser(CurrentSession.getUser()); +List list = Arrays.asList(roles); + +if (!list.contains(CurrentSession.getUserRealm().getRealmConfiguration().getAdminRoleName())) { +userName = CurrentSession.getUser(); +} + +} +} catch (UserStoreException e) { +String msg = Failed to get list of roles of user + userName; +log.error(msg, e); +throw new RegistryException(msg, e); +} This code segment will execute in two ways, 1. While doing a registry activity search (Please see the attached image), 2. Getting all the registry logs for indexing (This is a task which is executing by the REGISTRY_SYSTEM_USERNAME ) If non admin user doing a activity search (without fill the username field) we need to show only the activities relevant to that user, and all user activities for the admin user. This code segment already had in org.wso2.carbon.registry.activities bundle, But if a user doing a search using registry client it show different results than doing the same search using admin UI (that is a bug), therefore we moved that logic to core for consistency. I think this is clear enough, if not lets do a review on Monday. Thanks Regards, Ajith. Thanks regards, -Prabath On Sat, Sep 14, 2013 at 8:05 AM, Ajith Vitharana aji...@wso2.comwrote: Hi All, Please apply this patch as well [2]. You need to apply this to org.wso2.carbon.registry.core The test summary with the patch : Tests run: 173, Failures: 0, Errors: 0, Skipped: 0 [2]https://wso2.org/jira/browse/REGISTRY-1911 Thanks Ajith. On Thu, Sep 12, 2013 at 2:03 PM, Ajith Vitharana aji...@wso2.comwrote: Hi Shameera, Please apply the patch [1] for chunk02 release. [1]https://wso2.org/jira/browse/REGISTRY-1941 Thanks Ajith -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- Thanks Regards, Prabath Mobile : +94 71 809 6732 http://blog.facilelogin.com http://RampartFAQ.com -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Sameera Jayasoma, Architect, WSO2, Inc. (http://wso2.com) email: same...@wso2.com blog: http://sameera.adahas.org twitter: https://twitter.com/sameerajayasoma flickr: http://www.flickr.com/photos/sameera-jayasoma/collections Mobile: 0094776364456 Lean . Enterprise . Middleware ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Patch for kernel. - chunk02 release.
On Mon, Sep 16, 2013 at 7:36 AM, Sameera Jayasoma same...@wso2.com wrote: Applied the patch.. Thanks Sameera. /Ajith Sameera. On Sat, Sep 14, 2013 at 6:06 PM, Ajith Vitharana aji...@wso2.com wrote: Attaching image, On Sat, Sep 14, 2013 at 6:05 PM, Ajith Vitharana aji...@wso2.com wrote: Hi Prabath, On Sat, Sep 14, 2013 at 9:03 AM, Prabath Siriwardena prab...@wso2.comwrote: Hi Ajith, Can you please explain the code in the patch.. +// This is for fixing REGISTRY-1911 +try { +if (userName == null CurrentSession.getUser() != null + !CurrentSession.getUser().equals(CarbonConstants.REGISTRY_SYSTEM_USERNAME)) { +UserRealm realm = CurrentSession.getUserRealm(); +UserStoreManager reader = realm.getUserStoreManager(); +String[] roles = reader.getRoleListOfUser(CurrentSession.getUser()); +List list = Arrays.asList(roles); + +if (!list.contains(CurrentSession.getUserRealm().getRealmConfiguration().getAdminRoleName())) { +userName = CurrentSession.getUser(); +} + +} +} catch (UserStoreException e) { +String msg = Failed to get list of roles of user + userName; +log.error(msg, e); +throw new RegistryException(msg, e); +} This code segment will execute in two ways, 1. While doing a registry activity search (Please see the attached image), 2. Getting all the registry logs for indexing (This is a task which is executing by the REGISTRY_SYSTEM_USERNAME ) If non admin user doing a activity search (without fill the username field) we need to show only the activities relevant to that user, and all user activities for the admin user. This code segment already had in org.wso2.carbon.registry.activities bundle, But if a user doing a search using registry client it show different results than doing the same search using admin UI (that is a bug), therefore we moved that logic to core for consistency. I think this is clear enough, if not lets do a review on Monday. Thanks Regards, Ajith. Thanks regards, -Prabath On Sat, Sep 14, 2013 at 8:05 AM, Ajith Vitharana aji...@wso2.comwrote: Hi All, Please apply this patch as well [2]. You need to apply this to org.wso2.carbon.registry.core The test summary with the patch : Tests run: 173, Failures: 0, Errors: 0, Skipped: 0 [2]https://wso2.org/jira/browse/REGISTRY-1911 Thanks Ajith. On Thu, Sep 12, 2013 at 2:03 PM, Ajith Vitharana aji...@wso2.comwrote: Hi Shameera, Please apply the patch [1] for chunk02 release. [1]https://wso2.org/jira/browse/REGISTRY-1941 Thanks Ajith -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- Thanks Regards, Prabath Mobile : +94 71 809 6732 http://blog.facilelogin.com http://RampartFAQ.com -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Sameera Jayasoma, Architect, WSO2, Inc. (http://wso2.com) email: same...@wso2.com blog: http://sameera.adahas.org twitter: https://twitter.com/sameerajayasoma flickr: http://www.flickr.com/photos/sameera-jayasoma/collections Mobile: 0094776364456 Lean . Enterprise . Middleware -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Patch for kernel. - chunk02 release.
Hi Prabath, On Sat, Sep 14, 2013 at 9:03 AM, Prabath Siriwardena prab...@wso2.comwrote: Hi Ajith, Can you please explain the code in the patch.. +// This is for fixing REGISTRY-1911 +try { +if (userName == null CurrentSession.getUser() != null + !CurrentSession.getUser().equals(CarbonConstants.REGISTRY_SYSTEM_USERNAME)) { +UserRealm realm = CurrentSession.getUserRealm(); +UserStoreManager reader = realm.getUserStoreManager(); +String[] roles = reader.getRoleListOfUser(CurrentSession.getUser()); +List list = Arrays.asList(roles); + +if (!list.contains(CurrentSession.getUserRealm().getRealmConfiguration().getAdminRoleName())) { +userName = CurrentSession.getUser(); +} + +} +} catch (UserStoreException e) { +String msg = Failed to get list of roles of user + userName; +log.error(msg, e); +throw new RegistryException(msg, e); +} This code segment will execute in two ways, 1. While doing a registry activity search (Please see the attached image), 2. Getting all the registry logs for indexing (This is a task which is executing by the REGISTRY_SYSTEM_USERNAME ) If non admin user doing a activity search (without fill the username field) we need to show only the activities relevant to that user, and all user activities for the admin user. This code segment already had in org.wso2.carbon.registry.activities bundle, But if a user doing a search using registry client it show different results than doing the same search using admin UI (that is a bug), therefore we moved that logic to core for consistency. I think this is clear enough, if not lets do a review on Monday. Thanks Regards, Ajith. Thanks regards, -Prabath On Sat, Sep 14, 2013 at 8:05 AM, Ajith Vitharana aji...@wso2.com wrote: Hi All, Please apply this patch as well [2]. You need to apply this to org.wso2.carbon.registry.core The test summary with the patch : Tests run: 173, Failures: 0, Errors: 0, Skipped: 0 [2]https://wso2.org/jira/browse/REGISTRY-1911 Thanks Ajith. On Thu, Sep 12, 2013 at 2:03 PM, Ajith Vitharana aji...@wso2.com wrote: Hi Shameera, Please apply the patch [1] for chunk02 release. [1]https://wso2.org/jira/browse/REGISTRY-1941 Thanks Ajith -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- Thanks Regards, Prabath Mobile : +94 71 809 6732 http://blog.facilelogin.com http://RampartFAQ.com -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Patch for kernel. - chunk02 release.
Hi Ajith, We are working on it, BTW in you case, don't need to create 4.2.1 version of org.wso2.carbon.core only released *platform *components need that version increment. Your change will go with patch0001. Thanks, Shameera. On Fri, Sep 13, 2013 at 11:22 AM, Ajith Vitharana aji...@wso2.com wrote: Hi Carbon team, Please commit the kernel patches. Or grant commits rights :) Thanks On Thu, Sep 12, 2013 at 2:03 PM, Ajith Vitharana aji...@wso2.com wrote: Hi Shameera, Please apply the patch [1] for chunk02 release. [1]https://wso2.org/jira/browse/REGISTRY-1941 Thanks Ajith -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- *Software Engineer - WSO2 Inc.* *email: shameera AT wso2.com shame...@wso2.com , shameera AT apache.orgshame...@apache.org * *phone: +9471 922 1454* * * *Linked in : *http://lk.linkedin.com/pub/shameera-rathnayaka/1a/661/561 *Twitter : *https://twitter.com/Shameera_R ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Patch for kernel. - chunk02 release.
Hi All, Please apply this patch as well [2]. You need to apply this to org.wso2.carbon.registry.core The test summary with the patch : Tests run: 173, Failures: 0, Errors: 0, Skipped: 0 [2]https://wso2.org/jira/browse/REGISTRY-1911 Thanks Ajith. On Thu, Sep 12, 2013 at 2:03 PM, Ajith Vitharana aji...@wso2.com wrote: Hi Shameera, Please apply the patch [1] for chunk02 release. [1]https://wso2.org/jira/browse/REGISTRY-1941 Thanks Ajith -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Patch for kernel. - chunk02 release.
Hi Ajith, Can you please explain the code in the patch.. +// This is for fixing REGISTRY-1911 +try { +if (userName == null CurrentSession.getUser() != null + !CurrentSession.getUser().equals(CarbonConstants.REGISTRY_SYSTEM_USERNAME)) { +UserRealm realm = CurrentSession.getUserRealm(); +UserStoreManager reader = realm.getUserStoreManager(); +String[] roles = reader.getRoleListOfUser(CurrentSession.getUser()); +List list = Arrays.asList(roles); + +if (!list.contains(CurrentSession.getUserRealm().getRealmConfiguration().getAdminRoleName())) { +userName = CurrentSession.getUser(); +} + +} +} catch (UserStoreException e) { +String msg = Failed to get list of roles of user + userName; +log.error(msg, e); +throw new RegistryException(msg, e); +} Thanks regards, -Prabath On Sat, Sep 14, 2013 at 8:05 AM, Ajith Vitharana aji...@wso2.com wrote: Hi All, Please apply this patch as well [2]. You need to apply this to org.wso2.carbon.registry.core The test summary with the patch : Tests run: 173, Failures: 0, Errors: 0, Skipped: 0 [2]https://wso2.org/jira/browse/REGISTRY-1911 Thanks Ajith. On Thu, Sep 12, 2013 at 2:03 PM, Ajith Vitharana aji...@wso2.com wrote: Hi Shameera, Please apply the patch [1] for chunk02 release. [1]https://wso2.org/jira/browse/REGISTRY-1941 Thanks Ajith -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- Thanks Regards, Prabath Mobile : +94 71 809 6732 http://blog.facilelogin.com http://RampartFAQ.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Patch for kernel. - chunk02 release.
Hi Ajith, I've applied REGISTRY-1941. Sameera. On Thu, Sep 12, 2013 at 2:03 PM, Ajith Vitharana aji...@wso2.com wrote: Hi Shameera, Please apply the patch [1] for chunk02 release. [1]https://wso2.org/jira/browse/REGISTRY-1941 Thanks Ajith -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Sameera Jayasoma, Architect, WSO2, Inc. (http://wso2.com) email: same...@wso2.com blog: http://sameera.adahas.org twitter: https://twitter.com/sameerajayasoma flickr: http://www.flickr.com/photos/sameera-jayasoma/collections Mobile: 0094776364456 Lean . Enterprise . Middleware ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Patch for kernel. - chunk02 release.
Hi Shameera, Please apply the patch [1] for chunk02 release. [1]https://wso2.org/jira/browse/REGISTRY-1941 Thanks Ajith -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Patch for kernel. - chunk02 release.
Hi Carbon team, Please commit the kernel patches. Or grant commits rights :) Thanks On Thu, Sep 12, 2013 at 2:03 PM, Ajith Vitharana aji...@wso2.com wrote: Hi Shameera, Please apply the patch [1] for chunk02 release. [1]https://wso2.org/jira/browse/REGISTRY-1941 Thanks Ajith -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev