=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java 2015-09-07 13:13:33 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java 2015-09-09 20:18:52 +0000 @@ -35,6 +35,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import com.google.common.collect.Sets; + import org.apache.commons.collections.CollectionUtils; import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.common.DxfNamespaces; @@ -44,6 +45,7 @@ import org.hisp.dhis.common.view.DetailedView; import org.hisp.dhis.common.view.ExportView; import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.program.Program; import org.hisp.dhis.schema.annotation.PropertyRange; import java.util.ArrayList; @@ -61,8 +63,9 @@ public static final String AUTHORITY_ALL = "ALL"; public static final String[] CRITICAL_AUTHS = { "ALL", "F_SCHEDULING_ADMIN", "F_SYSTEM_SETTING", - "F_SQLVIEW_PUBLIC_ADD", "F_SQLVIEW_PRIVATE_ADD", "F_SQLVIEW_DELETE", "F_SQLVIEW_EXECUTE", "F_SQLVIEW_MANAGEMENT", - "F_USERROLE_PUBLIC_ADD", "F_USERROLE_PRIVATE_ADD", "F_USERROLE_DELETE", "F_USERROLE_LIST" }; + "F_SQLVIEW_PUBLIC_ADD", "F_SQLVIEW_PRIVATE_ADD", "F_SQLVIEW_DELETE", "F_SQLVIEW_EXECUTE", + "F_SQLVIEW_MANAGEMENT", "F_USERROLE_PUBLIC_ADD", "F_USERROLE_PRIVATE_ADD", "F_USERROLE_DELETE", + "F_USERROLE_LIST" }; /** * Required and unique. @@ -75,7 +78,9 @@ @Scanned private Set dataSets = new HashSet<>(); - + + private Set programs = new HashSet<>(); + // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- @@ -111,6 +116,18 @@ return authorities != null && CollectionUtils.containsAny( authorities, Sets.newHashSet( CRITICAL_AUTHS ) ); } + public void addProgam( Program program ) + { + programs.add( program ); + program.getUserRoles().add( this ); + } + + public boolean removeProgam( Program program ) + { + programs.remove( program ); + return program.getUserRoles().remove( this ); + } + // ------------------------------------------------------------------------- // Getters and setters // ------------------------------------------------------------------------- @@ -203,6 +220,26 @@ authorities.clear(); } + public void removeAllPrograms() + { + programs.clear(); + } + + @JsonProperty + @JsonSerialize( contentAs = BaseIdentifiableObject.class ) + @JsonView( { DetailedView.class, ExportView.class } ) + @JacksonXmlElementWrapper( localName = "programs", namespace = DxfNamespaces.DXF_2_0 ) + @JacksonXmlProperty( localName = "programs", namespace = DxfNamespaces.DXF_2_0 ) + public Set getPrograms() + { + return programs; + } + + public void setPrograms( Set programs ) + { + this.programs = programs; + } + @Override public void mergeWith( IdentifiableObject other, MergeStrategy strategy ) { @@ -218,7 +255,8 @@ } else if ( strategy.isMerge() ) { - description = userAuthorityGroup.getDescription() == null ? description : userAuthorityGroup.getDescription(); + description = userAuthorityGroup.getDescription() == null ? description : userAuthorityGroup + .getDescription(); } removeAllAuthorities(); @@ -226,6 +264,9 @@ removeAllDataSets(); dataSets.addAll( userAuthorityGroup.getDataSets() ); + + removeAllPrograms(); + programs.addAll( userAuthorityGroup.getPrograms() ); } } } === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2015-09-01 14:28:36 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2015-09-09 20:18:52 +0000 @@ -56,7 +56,7 @@ - + === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/UserAuthorityGroup.hbm.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/UserAuthorityGroup.hbm.xml 2014-03-24 18:52:45 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/UserAuthorityGroup.hbm.xml 2015-09-09 20:18:52 +0000 @@ -35,6 +35,11 @@ + + + + + === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2015-07-02 07:05:55 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2015-09-09 20:18:52 +0000 @@ -33,7 +33,7 @@ for ( i in json.programs ) { if(json.programs[i].programType=='WITH_REGISTRATION'){ count++; - jQuery( '#program').append( '' ); + jQuery( '#program').append( '' ); } } if(count==0){ === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPrograms.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPrograms.vm 2015-07-02 07:05:55 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPrograms.vm 2015-09-09 20:18:52 +0000 @@ -3,8 +3,7 @@ "programs": [ #foreach( $program in $programs ) { - "id" : ${program.id} , - "uid" : "${program.uid}" , + "id" : "$!{program.uid}", "name": "$!encoder.jsonEncode( ${program.name} )", "programType": "$program.programType" }#if( $velocityCount < $size ),#end === added file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetProgramsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetProgramsAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetProgramsAction.java 2015-09-09 20:18:52 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2004-2015, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.hisp.dhis.commons.action; + +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator; +import org.hisp.dhis.paging.ActionPagingSupport; +import org.hisp.dhis.program.Program; +import org.hisp.dhis.program.ProgramService; + +/** + * @author Chau Thu Tran + * + * $version GetProgramsAction.java Sep 8, 2015 3:44:27 PM $ + */ +public class GetProgramsAction extends ActionPagingSupport +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private ProgramService programService; + + public void setProgramService( ProgramService programService ) + { + this.programService = programService; + } + + // ------------------------------------------------------------------------- + // Input/Output + // ------------------------------------------------------------------------- + + private List programs = new ArrayList<>(); + + public List getPrograms() + { + return programs; + } + + private String key; + + public String getKey() + { + return key; + } + + public void setKey( String key ) + { + this.key = key; + } + + // ------------------------------------------------------------------------- + // Action implementation + // ------------------------------------------------------------------------- + + @Override + public String execute() + throws Exception + { + if ( isNotBlank( key ) ) + { + this.paging = createPaging( programService.getProgramCountByName( key ) ); + + programs = programService.getProgramBetweenByName( key, paging.getStartPos(), + paging.getPageSize() ); + } + else + { + this.paging = createPaging( programService.getProgramCount() ); + + programs = programService.getProgramsBetween( paging.getStartPos(), + paging.getPageSize() ); + } + + Collections.sort( programs, IdentifiableObjectNameComparator.INSTANCE ); + + return SUCCESS; + } +} \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2015-09-09 08:59:43 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2015-09-09 20:18:52 +0000 @@ -410,6 +410,11 @@ + + + + === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2015-09-08 15:56:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2015-09-09 20:18:52 +0000 @@ -678,7 +678,14 @@ plainTextError - + + + + /dhis-web-commons/ajax/jsonPrograms.vm + + plainTextError + + /dhis-web-commons/ajax/jsonminDataSets.vm === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/DefineProgramUserroleAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/DefineProgramUserroleAction.java 2015-05-13 03:05:12 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/DefineProgramUserroleAction.java 1970-01-01 00:00:00 +0000 @@ -1,107 +0,0 @@ -package org.hisp.dhis.trackedentity.action.program; - -/* - * Copyright (c) 2004-2015, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import com.opensymphony.xwork2.Action; -import org.hisp.dhis.program.Program; -import org.hisp.dhis.program.ProgramService; -import org.hisp.dhis.user.UserAuthorityGroup; -import org.hisp.dhis.user.UserService; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -/** - * @author Chau Thu Tran - * @version DefineProgramUserroleAction.java 12:43:40 PM Feb 19, 2013 $ - */ -public class DefineProgramUserroleAction - implements Action -{// ------------------------------------------------------------------------- - // Dependency - // ------------------------------------------------------------------------- - - private ProgramService programService; - - public void setProgramService( ProgramService programService ) - { - this.programService = programService; - } - - private UserService userService; - - public void setUserService( UserService userService ) - { - this.userService = userService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - private Collection urSelected = new HashSet<>(); - - public void setUrSelected( Collection urSelected ) - { - this.urSelected = urSelected; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - @Override - public String execute() - throws Exception - { - Program program = programService.getProgram( id ); - - Set userAuthorities = new HashSet<>(); - - for ( String id : urSelected ) - { - userAuthorities.add( userService.getUserAuthorityGroup( id ) ); - } - - program.setUserRoles( userAuthorities ); - - programService.updateProgram( program ); - - return SUCCESS; - } - -} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/META-INF/dhis/beans.xml 2015-06-19 10:48:49 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/META-INF/dhis/beans.xml 2015-09-09 20:18:52 +0000 @@ -229,14 +229,6 @@ - - - - - plainTextError - - /main.vm - /dhis-web-maintenance-program/programUserrole.vm - javascript/program.js - style/basic.css - F_PROGRAM_PUBLIC_ADD,F_PROGRAM_PRIVATE_ADD - - - - program.action - -   $i18n.getString( "sharing_settings" )
  •   $i18n.getString( "edit" )
  •   $i18n.getString( "assign_program_to_orgunits" )
  • -
  •   $i18n.getString( "assign_program_to_userroles" )
  •   $i18n.getString( "design_custom_registration_form" )
  •   $i18n.getString( "view_program_stages" )
  •   $i18n.getString( "view_program_indicators" )
  • === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programUserrole.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programUserrole.vm 2015-05-13 03:05:12 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programUserrole.vm 1970-01-01 00:00:00 +0000 @@ -1,29 +0,0 @@ - - -

    $i18n.getString( "assign_program_to_userroles" )

    - -

    $encoder.htmlEncode($program.displayName)

    - -
    - - - #jqSelected({ - "prefix": "ur", - "i18n_available": "available", - "i18n_selected": "selected", - "objects": $!program.userRoles - }) - -
    - - -
    === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddRoleAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddRoleAction.java 2015-03-11 11:01:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddRoleAction.java 2015-09-09 20:18:52 +0000 @@ -33,8 +33,11 @@ import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.program.Program; +import org.hisp.dhis.program.ProgramService; import org.hisp.dhis.user.UserAuthorityGroup; import org.hisp.dhis.user.UserService; +import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; import java.util.Collection; @@ -64,6 +67,9 @@ this.dataSetService = dataSetService; } + @Autowired + private ProgramService programService; + // ------------------------------------------------------------------------- // Input // ------------------------------------------------------------------------- @@ -95,12 +101,19 @@ { this.selectedListAuthority = selectedListAuthority; } + + private Collection selectedProgramList = new ArrayList<>(); + + public void setSelectedProgramList(Collection selectedProgramList) { + this.selectedProgramList = selectedProgramList; + } // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- - @Override + + @Override public String execute() throws Exception { @@ -115,6 +128,12 @@ group.getDataSets().add( dataSet ); } + for ( String id : selectedProgramList ) + { + Program program = programService.getProgram( id ); + group.getPrograms().add( program ); + } + group.getAuthorities().addAll( selectedListAuthority ); userService.addUserAuthorityGroup( group ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleAction.java 2015-01-17 07:41:26 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleAction.java 2015-09-09 20:18:52 +0000 @@ -35,9 +35,12 @@ import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.program.Program; +import org.hisp.dhis.program.ProgramService; import org.hisp.dhis.security.authority.SystemAuthoritiesProvider; import org.hisp.dhis.user.UserAuthorityGroup; import org.hisp.dhis.user.UserService; +import org.springframework.beans.factory.annotation.Autowired; import com.opensymphony.xwork2.Action; @@ -72,6 +75,9 @@ { this.authoritiesProvider = authoritiesProvider; } + + @Autowired + private ProgramService programService; // ------------------------------------------------------------------------- // Input @@ -101,15 +107,28 @@ { return availableDataSets; } - - private List roleDataSets; + + private List roleDataSets; public List getRoleDataSets() { return roleDataSets; } - private List availableAuthorities; + private List availablePrograms; + + public List getAvailablePrograms() + { + return availablePrograms; + } + + private List rolePrograms; + + public List getRolePrograms() { + return rolePrograms; + } + + private List availableAuthorities; public List getAvailableAuthorities() { @@ -147,6 +166,18 @@ Collections.sort( roleDataSets, IdentifiableObjectNameComparator.INSTANCE ); + + availablePrograms = new ArrayList<>( programService.getAllPrograms() ); + + availablePrograms.removeAll( userAuthorityGroup.getPrograms() ); + + Collections.sort( availablePrograms, IdentifiableObjectNameComparator.INSTANCE ); + + + rolePrograms = new ArrayList<>( userAuthorityGroup.getPrograms() ); + + Collections.sort( rolePrograms, IdentifiableObjectNameComparator.INSTANCE ); + // --------------------------------------------------------------------- // Authorities // --------------------------------------------------------------------- === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateRoleAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateRoleAction.java 2015-03-11 11:01:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateRoleAction.java 2015-09-09 20:18:52 +0000 @@ -33,8 +33,11 @@ import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.program.Program; +import org.hisp.dhis.program.ProgramService; import org.hisp.dhis.user.UserAuthorityGroup; import org.hisp.dhis.user.UserService; +import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; import java.util.Collection; @@ -64,6 +67,9 @@ this.dataSetService = dataSetService; } + @Autowired + private ProgramService programService; + private String message; public String getMessage() @@ -109,6 +115,12 @@ { this.selectedListAuthority = selectedListAuthority; } + + private Collection selectedProgramList = new ArrayList<>(); + + public void setSelectedProgramList(Collection selectedProgramList) { + this.selectedProgramList = selectedProgramList; + } // ------------------------------------------------------------------------- // Action implementation @@ -124,6 +136,7 @@ group.setDescription( StringUtils.trimToNull( description ) ); group.getDataSets().clear(); + group.getPrograms().clear(); group.getAuthorities().clear(); for ( String id : selectedList ) @@ -132,6 +145,12 @@ group.getDataSets().add( dataSet ); } + for ( String id : selectedProgramList ) + { + Program program = programService.getProgram( id ); + group.getPrograms().add( program ); + } + group.getAuthorities().addAll( selectedListAuthority ); userService.updateUserAuthorityGroup( group ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties 2015-06-23 19:48:46 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties 2015-09-09 20:18:52 +0000 @@ -382,4 +382,5 @@ self_registered_users = Self-registered users replicate=Replicate resend_invitation=Resend invitation -invitation_sent=Invitation sent \ No newline at end of file +invitation_sent=Invitation sent +programs = Programs \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addRoleForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addRoleForm.vm 2014-03-25 08:01:17 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addRoleForm.vm 2015-09-09 20:18:52 +0000 @@ -13,6 +13,19 @@ return option; } }); + + jQuery("#availableProgramList").dhisAjaxSelect({ + source: "../dhis-web-commons-ajax-json/getPrograms.action", + iterator: 'programs', + connectedTo: 'selectedProgramList', + handler: function(item) { + var option = jQuery("