Index: lams_admin/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_admin/conf/language/lams/ApplicationResources.properties,v diff -u -r1.10 -r1.10.2.1 --- lams_admin/conf/language/lams/ApplicationResources.properties 1 Jun 2007 03:54:05 -0000 1.10 +++ lams_admin/conf/language/lams/ApplicationResources.properties 18 Sep 2007 07:20:48 -0000 1.10.2.1 @@ -2,84 +2,54 @@ #language code: en #locale code: AU - # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Fri Jun 01 03:49:41 GMT 2007 + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Sat Sep 15 06:16:40 BST 2007 #=================== labels for LAMS Administration =================# -audit.organisation.change =Changed {0} for organisation: {1} from: {2} to: {3} -audit.organisation.create =Created organisation: {0} of type: {1} -audit.user.password.change =Password changed for: {0} -audit.user.create =Created user: {0}, Full Name: {1} -audit.user.disable =Disabled userId: {0} -audit.user.delete =Deleted userId: {0} -label.yes =Yes -label.no =No -label.or =Or -title.job.list =Jobs -lable.job.name =Job name -lable.job.start.date =Job start date -lable.job.description =Job description -errors.header =

Please correct the following errors before proceeding: -errors.footer =

-errors.prefix =
-error.system =Oops! An unexpected exception thrown by the system. Contact your System Administrator. -error.org.invalid =Invalid Organisation Id. {0} -error.orgtype.invalid =Invalid operation for this type of organisation. -error.name.required =Name is required. -error.login.required =Login is required. -error.login.unique =Login is already taken. {0} -error.password.required =Password is required. -error.authorisation =You are not authorised to do this. -error.newpassword.mismatch =Your new password does not match. -error.oldpassword.mismatch =Your old password is not correct. -error.img.format =The file you uploaded looks not an image. An image file usually has .jpg, .gif, .png or .bmp extension. -error.img.size =The file size exceeds the maximum 4096k limit. -error.need.sysadmin =You need to have the sys admin role to do this. -error.roles.empty =You need to assign at least one role. -error.userid.invalid =Invalid User Id. -error.firstname.required =First name is required. -error.lastname.required =Last Name is required. -error.email.required =Email address is required. -error.valid.email.required =Valid email address is required. -error.required ={0} is required. -error.not.unique ={0} is not unique. -error.roles.invalid =One or more roles are invalid. {0} -error.fail.add =Failed to add user. -error.authmethod.invalid =Invalid authentication method. {0} -error.flash.theme.invalid =Invalid flash theme. {0} -error.html.theme.invalid =Invalid html theme. {0} -error.locale.invalid =Invalid locale. {0} -msg.user.add.to.parent.group =User/s marked with a '*' will be automatically added to the parent group with the same roles. -msg.add.to.org =User will be added to {0}. -msg.results.none =No results matched your query. -msg.users.added ={0} users were added to groups/subgroups. -msg.disable.user.1 =This user has lesson and/or sequence data associated with it and cannot be deleted. -msg.disable.user.2 =User will be disabled instead, maintaining their data, but the account will be treated as deleted. -msg.disable.user.3 =It will not appear in group/subgroup lists, nor will the user be able to login. -msg.disable.user.4 =You can enable the user account again by editing the user's profile. -msg.delete.user.1 =User has no associated data and can be safely removed. -msg.delete.user.2 =Are you sure you want to delete this account? -msg.edit.tool.content.1 =This page contains a list of installed tools. -msg.edit.tool.content.2 =Changes to a tool's content using this screen will affect the tool's default appearance for all authors. -msg.edit.tool.content.3 =Note that you cannot upload files to a tool's default content, only edit the default text. -msg.roles.mandatory =You must assign at least one role. -msg.roles.mandatory.users =You must assign at least one role for each user. -organisation.state.ACTIVE =Active -organisation.state.HIDDEN =Hidden -organisation.state.ARCHIVED =Archived -organisation.state.REMOVED =Removed -admin.user.management =User Management -admin.user.entry =User Entry -admin.user.userid =User ID -admin.user.login =Login -admin.user.password =Password -admin.user.password.confirm =Confirm Password -admin.user.name =Name -admin.user.title =Title -admin.user.first_name =First Name -admin.user.last_name =Last Name -admin.user.address_line_1 =Address Line 1 -admin.user.address_line_2 =Address Line 2 +label.results.per.page =Results per page +label.import =Import +msg.import.intro =Use this screen to bulk import users using an Excel spreadsheet. +msg.import.conclusion =Click the help icon above for more information. +sysadmin.batch.temp.file.delete =Delete Old Temporary Files +label.global.roles =Global roles +msg.remove.from.subgroups =Removed users will also be removed from subgroups. +msg.group.organisation_id =The organisation_id of this group is +msg.subgroup.organisation_id =The organisation_id of this subgroup is +label.login.as =Login as +sysadmin.userinfoUrl =User Information URL +sysadmin.timeoutUrl =Timeout URL +sysadmin.server.add =Add New Server +sysadmin.organisation.create =Create new one +sysadmin.organisation.select =Please select... +sysadmin.login.text =Update the text under the logo on the login page: +sysadmin.headline =System Administration +sysadmin.config.settings.edit =Edit Configuration Settings +sysadmin.job.list =Job List +sysadmin.list.job =List scheduled jobs in Quartz queue +sysadmin.register.server =Register Server +sysadmin.edit.default.tool.content =Edit Default Tool Content +cache.maintain =Maintain LAMS Cache +cache.title =Cache Management +cache.entries.title =Cache Nodes +cache.explanation1 =Listed below are the current nodes in the cache. This keeps certain common objects in memory to speed up LAMS. It is managed automatically and should not require any intervention. However, if the system appears to be keeping 'old values' e.g. an old first name, try clearing all the nodes in the cache. Once cleared, LAMS will reload the objects from the database. +cache.explanation2 =Warning: Removing nodes will reduce the performance of the LAMS server. After a while, the cache will build up again and LAMS will run as usual. +cache.explanation3 =Warning: If you remove a node, you will remove the node and all its child nodes. +cache.button.remove =Remove +admin.config.key =Key +admin.config.value =Value +admin.register.sitename =Full Sitename +admin.register.orgname =Organisation +admin.register.directory =Directory +admin.register.directory.public =Public +admin.register.directory.private =Private +admin.register.heading.title =Register your server with the LAMS Community +admin.register.server.config.title =Server Configuration +admin.register.server.stats.title =Server Statistics +admin.register.server.config.url =Server URL +admin.register.server.config.version =Server Version +admin.register.server.config.build =Server Build No. +admin.register.server.config.locale =Server Language (Locale) +admin.register.server.config.langdate =Language Date admin.user.address_line_3 =Address Line 3 admin.user.city =City admin.user.state =State @@ -92,17 +62,16 @@ admin.user.email =Email admin.user.roles =Roles admin.user.manage =Manage Users -admin.user.delete =Delete User admin.user.add =Add/Remove Users admin.user.create =Create New User admin.user.assign.roles =Assign Roles admin.user.find =Find Users admin.user.edit =Edit User Details admin.user.disable =Disable User +admin.user.delete =Delete User admin.user.actions =Actions admin.user.import =Import Users admin.list.disabled.users =List Disabled Users -label.excel.spreadsheet =Upload Spreadsheet label.spreadsheet =spreadsheet label.download.template =Download the template role.AUTHOR =Author @@ -156,65 +125,95 @@ sysadmin.prefix =Prefix sysadmin.disabled =Disabled sysadmin.organisation =Organisation -sysadmin.userinfoUrl =User Information URL -sysadmin.timeoutUrl =Timeout URL -sysadmin.integrated.servers =integrated server(s) in total -sysadmin.server.add =Add New Server -sysadmin.organisation.create =Create new one -sysadmin.organisation.select =Please select... -sysadmin.login.logo =Upload a new logo. Use a height of 90 pixels and width between 180 and 340 pixels for best effect: -sysadmin.login.text =Update the text under the logo on the login page: -sysadmin.headline =System Administration -sysadmin.config.settings.edit =Edit Configuration Settings -sysadmin.batch.temp.file.delete =Delete Old Temporary Files -sysadmin.job.list =Job List -sysadmin.list.job =List scheduled jobs in Quartz queue -sysadmin.register.server =Register Server -sysadmin.edit.default.tool.content =Edit Default Tool Content -cache.maintain =Maintain LAMS Cache -cache.title =Cache Management -cache.entries.title =Cache Nodes -cache.explanation1 =Listed below are the current nodes in the cache. This keeps certain common objects in memory to speed up LAMS. It is managed automatically and should not require any intervention. However, if the system appears to be keeping 'old values' e.g. an old first name, try clearing all the nodes in the cache. Once cleared, LAMS will reload the objects from the database. -cache.explanation2 =Warning: Removing nodes will reduce the performance of the LAMS server. After a while, the cache will build up again and LAMS will run as usual. -cache.explanation3 =Warning: If you remove a node, you will remove the node and all its child nodes. -cache.button.remove =Remove -admin.config.key =Key -admin.config.value =Value -admin.register.sitename =Full Sitename -admin.register.orgname =Organisation -admin.register.directory =Directory -admin.register.directory.public =Public -admin.register.directory.private =Private -admin.register.heading.title =Register your server with the LAMS Community -admin.register.server.config.title =Server Configuration -admin.register.server.stats.title =Server Statistics -admin.register.server.config.url =Server URL -admin.register.server.config.version =Server Version -admin.register.server.config.build =Server Build No. -admin.register.server.config.locale =Server Language (Locale) -admin.register.server.config.langdate =Language Date +audit.organisation.change =Changed {0} for organisation: {1} from: {2} to: {3} +audit.organisation.create =Created organisation: {0} of type: {1} +audit.user.disable =Disabled userId: {0} +audit.user.delete =Deleted userId: {0} +label.yes =Yes +label.no =No +label.or =Or +title.job.list =Jobs +lable.job.name =Job name +lable.job.start.date =Job start date +lable.job.description =Job description +errors.header =

Please correct the following errors before proceeding: +errors.footer =

+errors.prefix =
label.show.all.users =Show all users -msg.group.organisation_id =The organisation_id of this group is -msg.subgroup.organisation_id =The organisation_id of this subgroup is -msg.remove.from.subgroups =Removed users will also be removed from subgroups. -label.global.roles =Global roles -label.import =Import -msg.import.intro =Use this screen to bulk import users using an Excel spreadsheet. +error.system =Oops! An unexpected exception thrown by the system. Contact your System Administrator. +error.org.invalid =Invalid Organisation Id. {0} +error.orgtype.invalid =Invalid operation for this type of organisation. +error.name.required =Name is required. +error.login.required =Login is required. +error.login.unique =Login is already taken. {0} +error.password.required =Password is required. +error.authorisation =You are not authorised to do this. +error.newpassword.mismatch =Your new password does not match. +error.oldpassword.mismatch =Your old password is not correct. +error.img.format =The file you uploaded looks not an image. An image file usually has .jpg, .gif, .png or .bmp extension. +error.img.size =The file size exceeds the maximum 4096k limit. +error.need.sysadmin =You need to have the sys admin role to do this. +error.roles.empty =You need to assign at least one role. +error.userid.invalid =Invalid User Id. +error.firstname.required =First name is required. +error.lastname.required =Last Name is required. +error.email.required =Email address is required. +error.valid.email.required =Valid email address is required. +error.required ={0} is required. +error.not.unique ={0} is not unique. +error.roles.invalid =One or more roles are invalid. {0} +error.fail.add =Failed to add user. +error.authmethod.invalid =Invalid authentication method. {0} +error.flash.theme.invalid =Invalid flash theme. {0} +error.html.theme.invalid =Invalid html theme. {0} +error.locale.invalid =Invalid locale. {0} +msg.user.add.to.parent.group =User/s marked with a '*' will be automatically added to the parent group with the same roles. +msg.add.to.org =User will be added to {0}. +msg.results.none =No results matched your query. +msg.disable.user.1 =This user has lesson and/or sequence data associated with it and cannot be deleted. +msg.disable.user.2 =User will be disabled instead, maintaining their data, but the account will be treated as deleted. +msg.disable.user.3 =It will not appear in group/subgroup lists, nor will the user be able to login. +msg.disable.user.4 =You can enable the user account again by editing the user's profile. +msg.delete.user.1 =User has no associated data and can be safely removed. +msg.delete.user.2 =Are you sure you want to delete this account? +msg.edit.tool.content.1 =This page contains a list of installed tools. +msg.edit.tool.content.2 =Changes to a tool's content using this screen will affect the tool's default appearance for all authors. +msg.edit.tool.content.3 =Note that you cannot upload files to a tool's default content, only edit the default text. +msg.roles.mandatory =You must assign at least one role. +msg.roles.mandatory.users =You must assign at least one role for each user. +organisation.state.ACTIVE =Active +organisation.state.HIDDEN =Hidden +organisation.state.ARCHIVED =Archived +organisation.state.REMOVED =Removed +admin.user.management =User Management +admin.user.entry =User Entry +admin.user.userid =User ID +admin.user.login =Login +admin.user.password =Password +admin.user.password.confirm =Confirm Password +admin.user.name =Name +admin.user.title =Title +admin.user.first_name =First Name +admin.user.last_name =Last Name +admin.user.address_line_1 =Address Line 1 +admin.user.address_line_2 =Address Line 2 +sysadmin.login.logo =Upload a new logo. Use a height of 90 pixels and width between 180 and 340 pixels for best effect: +error.no.sysadmin.priviledge =You do not have the required privileges to perform this action. +sysadmin.integrated.servers =integrated server(s) in total +sysadmin.library.activity.title =Title +sysadmin.library.management =Learning Library Management +sysadmin.library.activity.description =Description +admin.register.server.stats.total.users =Total # of Users +label.excel.spreadsheet =Upload Spreadsheet msg.import.1 =In the spreadsheet, columns marked with a (*) are mandatory. msg.import.2 =Download the user template to create users. -msg.import.conclusion =Click the help icon above for more information. -label.results.per.page =Results per page -admin.register.server.stats.total.users =Total # of Users msg.import.3 =Download the roles template to add users to groups/subgroups and assign their roles. error.user.does.not.exist =User does not exist {0} msg.users.created ={0} users were created successfully. -error.no.sysadmin.priviledge =You do not have the required privileges to perform this action. -sysadmin.library.management =Learning Library Management -sysadmin.library.totals =learning libraries in total -sysadmin.library.activity.title =Title -sysadmin.library.activity.description =Description sysadmin.library.createtim =Create time sysadmin.function =Function +sysadmin.library.totals =learning libraries in total +msg.users.added ={0} users were added to groups/subgroups. admin.importv1.title =Import LAMS 1 Users msg.importv1.1 =Download msg.importv1.2 =On the command line of your LAMS 1 database server, run the following command @@ -237,13 +236,28 @@ msg.cleanup.actual.space =Depending on your server's file system, the actual space occupied may differ from the above. msg.cleanup.recommended =It's recommended to leave at least 1 day of temporary files in order not to remove anything that's currently in use. label.cleanup.delete =Delete temporary files older than this number of days +msg.importv1.please.wait =Please wait while creating new users and groups... +error.cant.write.login.jsp =Couldn't write value of {0} to {1}, please check your {2} configuration. +msg.importv1.only.members =Only import users that are members of organisations/session classes to be imported msg.importv1.5 =Note that the passwords of the imported users will be reset, since LAMS 2 does not accept md5 passwords. They will be reset to the user's login. label.can.join.joint.lessons =Can join joint lessons label.can.offer.joint.lessons =Can offer joint lessons -error.cant.write.login.jsp =Couldn't write value of {0} to {1}, please check your {2} configuration. -msg.importv1.please.wait =Please wait while creating new users and groups... -msg.importv1.only.members =Only import users that are members of organisations/session classes to be imported -label.login.as =Login as +sysadmin.import.groups.title =Import Groups +heading.import.results =Import Results +table.heading.organisation.id =Organisation ID +import.groups.intro =Use this screen to bulk import groups and subgroups using an Excel spreadsheet. +import.groups.instructions =When creating a group, make sure the row above it is empty. When creating a subgroup, place it directly under it's parent group. +import.groups.download =Download the groups template to create groups and subgroups. +msg.please.wait =Please wait... +sysadmin.ldap.configuration =LDAP Configuration +label.synchronise =Synchronise +msg.num.ldap.users =There are {0} LDAP users in LAMS. +msg.ldap.synchronise.intro =This feature allows you to synchronise LAMS' database with your LDAP server. This includes updating existing users' profile and adding them to the LAMS group which matches their attributes. +msg.ldap.synchronise.warning =Note that this process may take some time depending on the number of users contained in your LDAP tree; it's best to perform this operation when the LAMS server will not be under load. +heading.ldap.synchronise =Synchronise with LDAP +msg.done =...done! +msg.tool.management =Tool Management +sysadmin.tool.management =Tool Management -#======= End labels: Exported 238 labels for en AU ===== +#======= End labels: Exported 254 labels for en AU ===== Index: lams_admin/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_admin/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u -r1.10 -r1.10.2.1 --- lams_admin/conf/language/lams/ApplicationResources_en_AU.properties 1 Jun 2007 03:54:05 -0000 1.10 +++ lams_admin/conf/language/lams/ApplicationResources_en_AU.properties 18 Sep 2007 07:20:48 -0000 1.10.2.1 @@ -2,84 +2,54 @@ #language code: en #locale code: AU - # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Fri Jun 01 03:49:41 GMT 2007 + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Sat Sep 15 06:16:40 BST 2007 #=================== labels for LAMS Administration =================# -audit.organisation.change =Changed {0} for organisation: {1} from: {2} to: {3} -audit.organisation.create =Created organisation: {0} of type: {1} -audit.user.password.change =Password changed for: {0} -audit.user.create =Created user: {0}, Full Name: {1} -audit.user.disable =Disabled userId: {0} -audit.user.delete =Deleted userId: {0} -label.yes =Yes -label.no =No -label.or =Or -title.job.list =Jobs -lable.job.name =Job name -lable.job.start.date =Job start date -lable.job.description =Job description -errors.header =

Please correct the following errors before proceeding: -errors.footer =

-errors.prefix =
-error.system =Oops! An unexpected exception thrown by the system. Contact your System Administrator. -error.org.invalid =Invalid Organisation Id. {0} -error.orgtype.invalid =Invalid operation for this type of organisation. -error.name.required =Name is required. -error.login.required =Login is required. -error.login.unique =Login is already taken. {0} -error.password.required =Password is required. -error.authorisation =You are not authorised to do this. -error.newpassword.mismatch =Your new password does not match. -error.oldpassword.mismatch =Your old password is not correct. -error.img.format =The file you uploaded looks not an image. An image file usually has .jpg, .gif, .png or .bmp extension. -error.img.size =The file size exceeds the maximum 4096k limit. -error.need.sysadmin =You need to have the sys admin role to do this. -error.roles.empty =You need to assign at least one role. -error.userid.invalid =Invalid User Id. -error.firstname.required =First name is required. -error.lastname.required =Last Name is required. -error.email.required =Email address is required. -error.valid.email.required =Valid email address is required. -error.required ={0} is required. -error.not.unique ={0} is not unique. -error.roles.invalid =One or more roles are invalid. {0} -error.fail.add =Failed to add user. -error.authmethod.invalid =Invalid authentication method. {0} -error.flash.theme.invalid =Invalid flash theme. {0} -error.html.theme.invalid =Invalid html theme. {0} -error.locale.invalid =Invalid locale. {0} -msg.user.add.to.parent.group =User/s marked with a '*' will be automatically added to the parent group with the same roles. -msg.add.to.org =User will be added to {0}. -msg.results.none =No results matched your query. -msg.users.added ={0} users were added to groups/subgroups. -msg.disable.user.1 =This user has lesson and/or sequence data associated with it and cannot be deleted. -msg.disable.user.2 =User will be disabled instead, maintaining their data, but the account will be treated as deleted. -msg.disable.user.3 =It will not appear in group/subgroup lists, nor will the user be able to login. -msg.disable.user.4 =You can enable the user account again by editing the user's profile. -msg.delete.user.1 =User has no associated data and can be safely removed. -msg.delete.user.2 =Are you sure you want to delete this account? -msg.edit.tool.content.1 =This page contains a list of installed tools. -msg.edit.tool.content.2 =Changes to a tool's content using this screen will affect the tool's default appearance for all authors. -msg.edit.tool.content.3 =Note that you cannot upload files to a tool's default content, only edit the default text. -msg.roles.mandatory =You must assign at least one role. -msg.roles.mandatory.users =You must assign at least one role for each user. -organisation.state.ACTIVE =Active -organisation.state.HIDDEN =Hidden -organisation.state.ARCHIVED =Archived -organisation.state.REMOVED =Removed -admin.user.management =User Management -admin.user.entry =User Entry -admin.user.userid =User ID -admin.user.login =Login -admin.user.password =Password -admin.user.password.confirm =Confirm Password -admin.user.name =Name -admin.user.title =Title -admin.user.first_name =First Name -admin.user.last_name =Last Name -admin.user.address_line_1 =Address Line 1 -admin.user.address_line_2 =Address Line 2 +label.results.per.page =Results per page +label.import =Import +msg.import.intro =Use this screen to bulk import users using an Excel spreadsheet. +msg.import.conclusion =Click the help icon above for more information. +sysadmin.batch.temp.file.delete =Delete Old Temporary Files +label.global.roles =Global roles +msg.remove.from.subgroups =Removed users will also be removed from subgroups. +msg.group.organisation_id =The organisation_id of this group is +msg.subgroup.organisation_id =The organisation_id of this subgroup is +label.login.as =Login as +sysadmin.userinfoUrl =User Information URL +sysadmin.timeoutUrl =Timeout URL +sysadmin.server.add =Add New Server +sysadmin.organisation.create =Create new one +sysadmin.organisation.select =Please select... +sysadmin.login.text =Update the text under the logo on the login page: +sysadmin.headline =System Administration +sysadmin.config.settings.edit =Edit Configuration Settings +sysadmin.job.list =Job List +sysadmin.list.job =List scheduled jobs in Quartz queue +sysadmin.register.server =Register Server +sysadmin.edit.default.tool.content =Edit Default Tool Content +cache.maintain =Maintain LAMS Cache +cache.title =Cache Management +cache.entries.title =Cache Nodes +cache.explanation1 =Listed below are the current nodes in the cache. This keeps certain common objects in memory to speed up LAMS. It is managed automatically and should not require any intervention. However, if the system appears to be keeping 'old values' e.g. an old first name, try clearing all the nodes in the cache. Once cleared, LAMS will reload the objects from the database. +cache.explanation2 =Warning: Removing nodes will reduce the performance of the LAMS server. After a while, the cache will build up again and LAMS will run as usual. +cache.explanation3 =Warning: If you remove a node, you will remove the node and all its child nodes. +cache.button.remove =Remove +admin.config.key =Key +admin.config.value =Value +admin.register.sitename =Full Sitename +admin.register.orgname =Organisation +admin.register.directory =Directory +admin.register.directory.public =Public +admin.register.directory.private =Private +admin.register.heading.title =Register your server with the LAMS Community +admin.register.server.config.title =Server Configuration +admin.register.server.stats.title =Server Statistics +admin.register.server.config.url =Server URL +admin.register.server.config.version =Server Version +admin.register.server.config.build =Server Build No. +admin.register.server.config.locale =Server Language (Locale) +admin.register.server.config.langdate =Language Date admin.user.address_line_3 =Address Line 3 admin.user.city =City admin.user.state =State @@ -92,17 +62,16 @@ admin.user.email =Email admin.user.roles =Roles admin.user.manage =Manage Users -admin.user.delete =Delete User admin.user.add =Add/Remove Users admin.user.create =Create New User admin.user.assign.roles =Assign Roles admin.user.find =Find Users admin.user.edit =Edit User Details admin.user.disable =Disable User +admin.user.delete =Delete User admin.user.actions =Actions admin.user.import =Import Users admin.list.disabled.users =List Disabled Users -label.excel.spreadsheet =Upload Spreadsheet label.spreadsheet =spreadsheet label.download.template =Download the template role.AUTHOR =Author @@ -156,65 +125,95 @@ sysadmin.prefix =Prefix sysadmin.disabled =Disabled sysadmin.organisation =Organisation -sysadmin.userinfoUrl =User Information URL -sysadmin.timeoutUrl =Timeout URL -sysadmin.integrated.servers =integrated server(s) in total -sysadmin.server.add =Add New Server -sysadmin.organisation.create =Create new one -sysadmin.organisation.select =Please select... -sysadmin.login.logo =Upload a new logo. Use a height of 90 pixels and width between 180 and 340 pixels for best effect: -sysadmin.login.text =Update the text under the logo on the login page: -sysadmin.headline =System Administration -sysadmin.config.settings.edit =Edit Configuration Settings -sysadmin.batch.temp.file.delete =Delete Old Temporary Files -sysadmin.job.list =Job List -sysadmin.list.job =List scheduled jobs in Quartz queue -sysadmin.register.server =Register Server -sysadmin.edit.default.tool.content =Edit Default Tool Content -cache.maintain =Maintain LAMS Cache -cache.title =Cache Management -cache.entries.title =Cache Nodes -cache.explanation1 =Listed below are the current nodes in the cache. This keeps certain common objects in memory to speed up LAMS. It is managed automatically and should not require any intervention. However, if the system appears to be keeping 'old values' e.g. an old first name, try clearing all the nodes in the cache. Once cleared, LAMS will reload the objects from the database. -cache.explanation2 =Warning: Removing nodes will reduce the performance of the LAMS server. After a while, the cache will build up again and LAMS will run as usual. -cache.explanation3 =Warning: If you remove a node, you will remove the node and all its child nodes. -cache.button.remove =Remove -admin.config.key =Key -admin.config.value =Value -admin.register.sitename =Full Sitename -admin.register.orgname =Organisation -admin.register.directory =Directory -admin.register.directory.public =Public -admin.register.directory.private =Private -admin.register.heading.title =Register your server with the LAMS Community -admin.register.server.config.title =Server Configuration -admin.register.server.stats.title =Server Statistics -admin.register.server.config.url =Server URL -admin.register.server.config.version =Server Version -admin.register.server.config.build =Server Build No. -admin.register.server.config.locale =Server Language (Locale) -admin.register.server.config.langdate =Language Date +audit.organisation.change =Changed {0} for organisation: {1} from: {2} to: {3} +audit.organisation.create =Created organisation: {0} of type: {1} +audit.user.disable =Disabled userId: {0} +audit.user.delete =Deleted userId: {0} +label.yes =Yes +label.no =No +label.or =Or +title.job.list =Jobs +lable.job.name =Job name +lable.job.start.date =Job start date +lable.job.description =Job description +errors.header =

Please correct the following errors before proceeding: +errors.footer =

+errors.prefix =
label.show.all.users =Show all users -msg.group.organisation_id =The organisation_id of this group is -msg.subgroup.organisation_id =The organisation_id of this subgroup is -msg.remove.from.subgroups =Removed users will also be removed from subgroups. -label.global.roles =Global roles -label.import =Import -msg.import.intro =Use this screen to bulk import users using an Excel spreadsheet. +error.system =Oops! An unexpected exception thrown by the system. Contact your System Administrator. +error.org.invalid =Invalid Organisation Id. {0} +error.orgtype.invalid =Invalid operation for this type of organisation. +error.name.required =Name is required. +error.login.required =Login is required. +error.login.unique =Login is already taken. {0} +error.password.required =Password is required. +error.authorisation =You are not authorised to do this. +error.newpassword.mismatch =Your new password does not match. +error.oldpassword.mismatch =Your old password is not correct. +error.img.format =The file you uploaded looks not an image. An image file usually has .jpg, .gif, .png or .bmp extension. +error.img.size =The file size exceeds the maximum 4096k limit. +error.need.sysadmin =You need to have the sys admin role to do this. +error.roles.empty =You need to assign at least one role. +error.userid.invalid =Invalid User Id. +error.firstname.required =First name is required. +error.lastname.required =Last Name is required. +error.email.required =Email address is required. +error.valid.email.required =Valid email address is required. +error.required ={0} is required. +error.not.unique ={0} is not unique. +error.roles.invalid =One or more roles are invalid. {0} +error.fail.add =Failed to add user. +error.authmethod.invalid =Invalid authentication method. {0} +error.flash.theme.invalid =Invalid flash theme. {0} +error.html.theme.invalid =Invalid html theme. {0} +error.locale.invalid =Invalid locale. {0} +msg.user.add.to.parent.group =User/s marked with a '*' will be automatically added to the parent group with the same roles. +msg.add.to.org =User will be added to {0}. +msg.results.none =No results matched your query. +msg.disable.user.1 =This user has lesson and/or sequence data associated with it and cannot be deleted. +msg.disable.user.2 =User will be disabled instead, maintaining their data, but the account will be treated as deleted. +msg.disable.user.3 =It will not appear in group/subgroup lists, nor will the user be able to login. +msg.disable.user.4 =You can enable the user account again by editing the user's profile. +msg.delete.user.1 =User has no associated data and can be safely removed. +msg.delete.user.2 =Are you sure you want to delete this account? +msg.edit.tool.content.1 =This page contains a list of installed tools. +msg.edit.tool.content.2 =Changes to a tool's content using this screen will affect the tool's default appearance for all authors. +msg.edit.tool.content.3 =Note that you cannot upload files to a tool's default content, only edit the default text. +msg.roles.mandatory =You must assign at least one role. +msg.roles.mandatory.users =You must assign at least one role for each user. +organisation.state.ACTIVE =Active +organisation.state.HIDDEN =Hidden +organisation.state.ARCHIVED =Archived +organisation.state.REMOVED =Removed +admin.user.management =User Management +admin.user.entry =User Entry +admin.user.userid =User ID +admin.user.login =Login +admin.user.password =Password +admin.user.password.confirm =Confirm Password +admin.user.name =Name +admin.user.title =Title +admin.user.first_name =First Name +admin.user.last_name =Last Name +admin.user.address_line_1 =Address Line 1 +admin.user.address_line_2 =Address Line 2 +sysadmin.login.logo =Upload a new logo. Use a height of 90 pixels and width between 180 and 340 pixels for best effect: +error.no.sysadmin.priviledge =You do not have the required privileges to perform this action. +sysadmin.integrated.servers =integrated server(s) in total +sysadmin.library.activity.title =Title +sysadmin.library.management =Learning Library Management +sysadmin.library.activity.description =Description +admin.register.server.stats.total.users =Total # of Users +label.excel.spreadsheet =Upload Spreadsheet msg.import.1 =In the spreadsheet, columns marked with a (*) are mandatory. msg.import.2 =Download the user template to create users. -msg.import.conclusion =Click the help icon above for more information. -label.results.per.page =Results per page -admin.register.server.stats.total.users =Total # of Users msg.import.3 =Download the roles template to add users to groups/subgroups and assign their roles. error.user.does.not.exist =User does not exist {0} msg.users.created ={0} users were created successfully. -error.no.sysadmin.priviledge =You do not have the required privileges to perform this action. -sysadmin.library.management =Learning Library Management -sysadmin.library.totals =learning libraries in total -sysadmin.library.activity.title =Title -sysadmin.library.activity.description =Description sysadmin.library.createtim =Create time sysadmin.function =Function +sysadmin.library.totals =learning libraries in total +msg.users.added ={0} users were added to groups/subgroups. admin.importv1.title =Import LAMS 1 Users msg.importv1.1 =Download msg.importv1.2 =On the command line of your LAMS 1 database server, run the following command @@ -237,13 +236,28 @@ msg.cleanup.actual.space =Depending on your server's file system, the actual space occupied may differ from the above. msg.cleanup.recommended =It's recommended to leave at least 1 day of temporary files in order not to remove anything that's currently in use. label.cleanup.delete =Delete temporary files older than this number of days +msg.importv1.please.wait =Please wait while creating new users and groups... +error.cant.write.login.jsp =Couldn't write value of {0} to {1}, please check your {2} configuration. +msg.importv1.only.members =Only import users that are members of organisations/session classes to be imported msg.importv1.5 =Note that the passwords of the imported users will be reset, since LAMS 2 does not accept md5 passwords. They will be reset to the user's login. label.can.join.joint.lessons =Can join joint lessons label.can.offer.joint.lessons =Can offer joint lessons -error.cant.write.login.jsp =Couldn't write value of {0} to {1}, please check your {2} configuration. -msg.importv1.please.wait =Please wait while creating new users and groups... -msg.importv1.only.members =Only import users that are members of organisations/session classes to be imported -label.login.as =Login as +sysadmin.import.groups.title =Import Groups +heading.import.results =Import Results +table.heading.organisation.id =Organisation ID +import.groups.intro =Use this screen to bulk import groups and subgroups using an Excel spreadsheet. +import.groups.instructions =When creating a group, make sure the row above it is empty. When creating a subgroup, place it directly under it's parent group. +import.groups.download =Download the groups template to create groups and subgroups. +msg.please.wait =Please wait... +sysadmin.ldap.configuration =LDAP Configuration +label.synchronise =Synchronise +msg.num.ldap.users =There are {0} LDAP users in LAMS. +msg.ldap.synchronise.intro =This feature allows you to synchronise LAMS' database with your LDAP server. This includes updating existing users' profile and adding them to the LAMS group which matches their attributes. +msg.ldap.synchronise.warning =Note that this process may take some time depending on the number of users contained in your LDAP tree; it's best to perform this operation when the LAMS server will not be under load. +heading.ldap.synchronise =Synchronise with LDAP +msg.done =...done! +msg.tool.management =Tool Management +sysadmin.tool.management =Tool Management -#======= End labels: Exported 238 labels for en AU ===== +#======= End labels: Exported 254 labels for en AU ===== Index: lams_admin/conf/xdoclet/web-settings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_admin/conf/xdoclet/web-settings.xml,v diff -u -r1.9 -r1.9.6.1 --- lams_admin/conf/xdoclet/web-settings.xml 20 Oct 2006 02:39:40 -0000 1.9 +++ lams_admin/conf/xdoclet/web-settings.xml 18 Sep 2007 07:20:49 -0000 1.9.6.1 @@ -14,6 +14,7 @@ classpath:/org/lamsfoundation/lams/toolApplicationContext.xml classpath:/org/lamsfoundation/lams/integrationContext.xml classpath:/org/lamsfoundation/lams/admin/adminApplicationContext.xml + classpath:/org/lamsfoundation/lams/usermanagement/ldapContext.xml Index: lams_admin/src/java/org/lamsfoundation/lams/admin/service/AdminServiceProxy.java =================================================================== RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/service/AdminServiceProxy.java,v diff -u -r1.4 -r1.4.2.1 --- lams_admin/src/java/org/lamsfoundation/lams/admin/service/AdminServiceProxy.java 7 Feb 2007 00:20:04 -0000 1.4 +++ lams_admin/src/java/org/lamsfoundation/lams/admin/service/AdminServiceProxy.java 18 Sep 2007 07:20:48 -0000 1.4.2.1 @@ -27,6 +27,7 @@ import org.lamsfoundation.lams.integration.service.IIntegrationService; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; +import org.lamsfoundation.lams.usermanagement.service.LdapService; import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.audit.IAuditService; import org.springframework.web.context.WebApplicationContext; @@ -44,46 +45,54 @@ private static IIntegrationService integrationService; private static IAuditService auditService; private static IImportService importService; + private static LdapService ldapService; - public static final IUserManagementService getService(ServletContext servletContext){ + public static final IUserManagementService getService(ServletContext servletContext) { if (manageService == null) { - WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); - return (IUserManagementService) ctx.getBean("userManagementServiceTarget"); + return (IUserManagementService)getDomainService(servletContext, "userManagementService"); } else { return manageService; } } - public static final MessageService getMessageService(ServletContext servletContext){ + public static final MessageService getMessageService(ServletContext servletContext) { if (messageService == null) { - WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); - return (MessageService)ctx.getBean("adminMessageService"); + return (MessageService)getDomainService(servletContext, "adminMessageService"); } else { return messageService; } } - public static final IIntegrationService getIntegrationService(ServletContext servletContext){ - if(integrationService == null){ - WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); - integrationService = (IIntegrationService)ctx.getBean("integrationService"); + public static final IIntegrationService getIntegrationService(ServletContext servletContext) { + if (integrationService == null){ + integrationService = (IIntegrationService)getDomainService(servletContext, "integrationService"); } return integrationService; } - public static final IAuditService getAuditService(ServletContext servletContext){ - if(auditService==null){ - WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); - auditService = (IAuditService)ctx.getBean("auditService"); + public static final IAuditService getAuditService(ServletContext servletContext) { + if (auditService == null){ + auditService = (IAuditService)getDomainService(servletContext, "auditService"); } return auditService; } - public static final IImportService getImportService(ServletContext servletContext){ - if(importService==null){ - WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); - importService = (IImportService)ctx.getBean("importService"); + public static final IImportService getImportService(ServletContext servletContext) { + if (importService == null){ + importService = (IImportService)getDomainService(servletContext, "importService"); } return importService; } + + public static final LdapService getLdapService(ServletContext servletContext) { + if (ldapService == null) { + ldapService = (LdapService)getDomainService(servletContext, "ldapService"); + } + return ldapService; + } + + private static Object getDomainService(ServletContext servletContext,String serviceName) { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); + return wac.getBean(serviceName); + } } Index: lams_admin/src/java/org/lamsfoundation/lams/admin/service/ImportService.java =================================================================== RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/service/ImportService.java,v diff -u -r1.1 -r1.1.6.1 --- lams_admin/src/java/org/lamsfoundation/lams/admin/service/ImportService.java 7 Feb 2007 00:20:04 -0000 1.1 +++ lams_admin/src/java/org/lamsfoundation/lams/admin/service/ImportService.java 18 Sep 2007 07:20:48 -0000 1.1.6.1 @@ -411,7 +411,7 @@ } if (!hasError) { - service.setRolesForUserOrganisation(user, org, roles); + service.setRolesForUserOrganisation(user, org.getOrganisationId(), roles); log.debug("added: "+login+" to: "+org.getName()+" with roles: "+roles); } } Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserOrgRoleSaveAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserOrgRoleSaveAction.java,v diff -u -r1.12 -r1.12.6.1 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserOrgRoleSaveAction.java 1 Nov 2006 22:52:56 -0000 1.12 +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserOrgRoleSaveAction.java 18 Sep 2007 07:20:49 -0000 1.12.6.1 @@ -83,8 +83,6 @@ Integer orgId = (Integer)userOrgRoleForm.getOrgId(); log.debug("orgId: "+orgId); - Organisation organisation = (Organisation)service.findById(Organisation.class, orgId); - request.setAttribute("org",orgId); request.getSession().removeAttribute("UserOrgRoleForm"); @@ -107,12 +105,14 @@ request.setAttribute("orgId", orgId); return mapping.findForward("userorg"); } - service.setRolesForUserOrganisation(user, organisation, (List)Arrays.asList(roleIds)); - if (organisation.getOrganisationType().getOrganisationTypeId().equals(OrganisationType.CLASS_TYPE)) { - if (service.getUserOrganisation(bean.getUserId(), organisation.getParentOrganisation().getOrganisationId())==null) { - service.setRolesForUserOrganisation(user, organisation.getParentOrganisation(), (List)Arrays.asList(roleIds)); - } - } + service.setRolesForUserOrganisation(user, orgId, (List)Arrays.asList(roleIds)); + // FMALIKOFF 5/7/7 Commented out the following code that set the roles in the course if the current org is a class, as the logic + // is done in service.setRolesForUserOrganisation() + //if (organisation.getOrganisationType().getOrganisationTypeId().equals(OrganisationType.CLASS_TYPE)) { + // if (service.getUserOrganisation(bean.getUserId(), organisation.getParentOrganisation().getOrganisationId())==null) { + // service.setRolesForUserOrganisation(user, organisation.getParentOrganisation(), (List)Arrays.asList(roleIds)); + // } + //} } return mapping.findForward("userlist"); } Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserRolesSaveAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserRolesSaveAction.java,v diff -u -r1.5 -r1.5.6.1 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserRolesSaveAction.java 29 Nov 2006 01:55:53 -0000 1.5 +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserRolesSaveAction.java 18 Sep 2007 07:20:49 -0000 1.5.6.1 @@ -100,7 +100,7 @@ return mapping.findForward("userroles"); } - service.setRolesForUserOrganisation(user, org, (List)Arrays.asList(roles)); + service.setRolesForUserOrganisation(user, orgId, (List)Arrays.asList(roles)); return mapping.findForward("userlist"); } Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSaveAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSaveAction.java,v diff -u -r1.31 -r1.31.2.1 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSaveAction.java 7 May 2007 06:47:34 -0000 1.31 +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSaveAction.java 18 Sep 2007 07:20:49 -0000 1.31.2.1 @@ -148,7 +148,7 @@ log.debug("editing userId: " + userId); // hash the new password if necessary, and audit the fact if (passwordChanged) { - writeAuditLog(user, new String[1]); + service.auditPasswordChanged(user, AdminConstants.MODULE_NAME); userForm.set("password", HashUtil.sha1((String)userForm.get("password"))); } else { userForm.set("password", user.getPassword()); @@ -162,18 +162,8 @@ log.debug("creating user... new login: " + user.getLogin()); if (errors.isEmpty()) { // TODO set flash/html themes according to user input instead of server default. - String flashName = Configuration.get(ConfigurationKeys.DEFAULT_FLASH_THEME); - List list = service.findByProperty(CSSThemeVisualElement.class, "name", flashName); - if (list!=null) { - CSSThemeVisualElement flashTheme = (CSSThemeVisualElement)list.get(0); - user.setFlashTheme(flashTheme); - } - String htmlName = Configuration.get(ConfigurationKeys.DEFAULT_HTML_THEME); - list = service.findByProperty(CSSThemeVisualElement.class, "name", htmlName); - if (list!=null) { - CSSThemeVisualElement htmlTheme = (CSSThemeVisualElement)list.get(0); - user.setHtmlTheme(htmlTheme); - } + user.setFlashTheme(service.getDefaultFlashTheme()); + user.setHtmlTheme(service.getDefaultHtmlTheme()); user.setDisabledFlag(false); user.setCreateDate(new Date()); user.setAuthenticationMethod((AuthenticationMethod)service.findByProperty(AuthenticationMethod.class, @@ -183,7 +173,7 @@ service.save(user); // make 'create user' audit log entry - writeAuditLog(user, new String[2]); + service.auditUserCreated(user, AdminConstants.MODULE_NAME); log.debug("user: " + user.toString()); } @@ -209,22 +199,5 @@ return mapping.findForward("user"); } } - - private void writeAuditLog(User user, String[] args) { - if (args.length==1) { // password changed - args[0] = user.getLogin()+"("+user.getUserId()+")"; - String message = AdminServiceProxy.getMessageService(getServlet().getServletContext()) - .getMessage("audit.user.password.change",args); - AdminServiceProxy.getAuditService(getServlet().getServletContext()) - .log(AdminConstants.MODULE_NAME, message); - } else if (args.length==2) { // user created - args[0] = user.getLogin()+"("+user.getUserId()+")"; - args[1] = user.getFullName(); - String message = AdminServiceProxy.getMessageService(getServlet().getServletContext()) - .getMessage("audit.user.create", args); - AdminServiceProxy.getAuditService(getServlet().getServletContext()) - .log(AdminConstants.MODULE_NAME, message); - } - } } Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/ImportV1ContentsSaveAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/Attic/ImportV1ContentsSaveAction.java,v diff -u -r1.4 -r1.4.6.1 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/ImportV1ContentsSaveAction.java 14 Feb 2007 03:22:29 -0000 1.4 +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/ImportV1ContentsSaveAction.java 18 Sep 2007 07:20:48 -0000 1.4.6.1 @@ -169,7 +169,7 @@ if (v1user.getRoleIds().contains(V1UserDTO.ROLE_CORE)) { ArrayList roles = new ArrayList(); roles.add(Role.ROLE_SYSADMIN.toString()); - service.setRolesForUserOrganisation(user, service.getRootOrganisation(), roles); + service.setRolesForUserOrganisation(user, service.getRootOrganisation().getOrganisationId(), roles); } for (V1OrgRightDTO v1orgRight : v1user.getOrgRights()) { // the org was not selected to be imported @@ -178,7 +178,7 @@ } List roles = getV2RoleIds(v1user.getRoleIds(), v1orgRight); Organisation org = (Organisation)service.findById(Organisation.class, orgIdsMap.get(v1orgRight.getOrgSid())); - service.setRolesForUserOrganisation(user, org, roles); + service.setRolesForUserOrganisation(user, org.getOrganisationId(), roles); } } Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/SysAdminStartAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/SysAdminStartAction.java,v diff -u -r1.6 -r1.6.2.1 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/SysAdminStartAction.java 30 Mar 2007 03:41:00 -0000 1.6 +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/SysAdminStartAction.java 18 Sep 2007 07:20:48 -0000 1.6.2.1 @@ -64,6 +64,7 @@ links.add(new LinkBean("usersearch.do", "admin.user.find")); links.add(new LinkBean("importexcel.do", "admin.user.import")); links.add(new LinkBean("importv1.do", "admin.importv1.title")); + links.add(new LinkBean("ldap.do", "sysadmin.ldap.configuration")); links.add(new LinkBean("disabledmanage.do", "admin.list.disabled.users")); links.add(new LinkBean("loginmaintain.do", "sysadmin.maintain.loginpage")); links.add(new LinkBean("serverlist.do", "sysadmin.maintain.external.servers")); Index: lams_admin/web/WEB-INF/tiles/tiles-defs.xml =================================================================== RCS file: /usr/local/cvsroot/lams_admin/web/WEB-INF/tiles/Attic/tiles-defs.xml,v diff -u -r1.27 -r1.27.2.1 --- lams_admin/web/WEB-INF/tiles/tiles-defs.xml 24 Apr 2007 01:58:52 -0000 1.27 +++ lams_admin/web/WEB-INF/tiles/tiles-defs.xml 18 Sep 2007 07:20:49 -0000 1.27.2.1 @@ -1,6 +1,11 @@ + + + + + Index: lams_central/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_central/conf/language/lams/ApplicationResources.properties,v diff -u -r1.5 -r1.5.2.1 --- lams_central/conf/language/lams/ApplicationResources.properties 9 May 2007 05:52:36 -0000 1.5 +++ lams_central/conf/language/lams/ApplicationResources.properties 18 Sep 2007 07:20:59 -0000 1.5.2.1 @@ -181,6 +181,9 @@ flash.download.player =Download Flash Player audit.user.password.change =Password changed for: {0} title.author.window =LAMS :: Author +title.all.my.lessons = All My Lessons +msg.no.lessons = No lessons +label.return.to.myprofile = Return to My Profile #======= End labels: Exported 175 labels for en AU ===== Index: lams_central/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_central/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u -r1.5 -r1.5.2.1 --- lams_central/conf/language/lams/ApplicationResources_en_AU.properties 9 May 2007 05:52:36 -0000 1.5 +++ lams_central/conf/language/lams/ApplicationResources_en_AU.properties 18 Sep 2007 07:20:59 -0000 1.5.2.1 @@ -181,6 +181,9 @@ flash.download.player =Download Flash Player audit.user.password.change =Password changed for: {0} title.author.window =LAMS :: Author +title.all.my.lessons = All My Lessons +msg.no.lessons = No lessons +label.return.to.myprofile = Return to My Profile #======= End labels: Exported 175 labels for en AU ===== Index: lams_central/conf/xdoclet/web-settings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_central/conf/xdoclet/web-settings.xml,v diff -u -r1.14 -r1.14.8.1 --- lams_central/conf/xdoclet/web-settings.xml 20 Sep 2006 02:35:13 -0000 1.14 +++ lams_central/conf/xdoclet/web-settings.xml 18 Sep 2007 07:20:59 -0000 1.14.8.1 @@ -14,6 +14,7 @@ classpath:/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml classpath:/org/lamsfoundation/lams/web/webApplicationContext.xml classpath:/org/lamsfoundation/lams/integrationContext.xml + classpath:/org/lamsfoundation/lams/usermanagement/ldapContext.xml classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml Fisheye: Tag 1.6.8.1 refers to a dead (removed) revision in file `lams_central/src/java/org/lamsfoundation/lams/security/AuthenticationMethodConfigurer.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_central/src/java/org/lamsfoundation/lams/security/DatabaseAuthenticator.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/security/DatabaseAuthenticator.java,v diff -u -r1.4 -r1.4.8.1 --- lams_central/src/java/org/lamsfoundation/lams/security/DatabaseAuthenticator.java 17 Sep 2006 06:12:05 -0000 1.4 +++ lams_central/src/java/org/lamsfoundation/lams/security/DatabaseAuthenticator.java 18 Sep 2007 07:20:59 -0000 1.4.8.1 @@ -27,25 +27,21 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; + import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; -import org.lamsfoundation.lams.usermanagement.AuthenticationMethod; - public class DatabaseAuthenticator { - private AuthenticationMethod method; private String dsJndiName; private String principalsQuery; - public DatabaseAuthenticator( AuthenticationMethod method) - { - this.method = method; - this.dsJndiName = method.getParameterByName("dsJndiName").getValue(); - this.principalsQuery = method.getParameterByName("principalsQuery").getValue(); + public DatabaseAuthenticator(String dsJndiName, String principalsQuery) { + this.dsJndiName = dsJndiName; + this.principalsQuery = principalsQuery; } public boolean authenticate( String username, String inputPassword ) Index: lams_central/src/java/org/lamsfoundation/lams/security/LDAPAuthenticator.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/security/LDAPAuthenticator.java,v diff -u -r1.6 -r1.6.2.1 --- lams_central/src/java/org/lamsfoundation/lams/security/LDAPAuthenticator.java 7 May 2007 06:53:07 -0000 1.6 +++ lams_central/src/java/org/lamsfoundation/lams/security/LDAPAuthenticator.java 18 Sep 2007 07:20:59 -0000 1.6.2.1 @@ -24,42 +24,62 @@ package org.lamsfoundation.lams.security; import java.util.Properties; + +import javax.naming.AuthenticationException; +import javax.naming.AuthenticationNotSupportedException; import javax.naming.Context; +import javax.naming.NamingEnumeration; +import javax.naming.directory.Attributes; import javax.naming.ldap.InitialLdapContext; +import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.service.LdapService; +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.web.util.HttpSessionManager; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; -import org.lamsfoundation.lams.usermanagement.AuthenticationMethod; - public class LDAPAuthenticator { + private static Logger log = Logger.getLogger(LDAPAuthenticator.class); - - private static final String USE_OBJECT_CREDENTIAL_OPT = "useObjectCredential"; - - private static final String PRINCIPAL_DN_PREFIX_OPT = "principalDNPrefix"; - - private static final String PRINCIPAL_DN_SUFFIX_OPT = "principalDNSuffix"; - - private static final String ROLES_CTX_DN_OPT = "rolesCtxDN"; - - private static final String USER_ROLES_CTX_DN_ATTRIBUTE_ID_OPT = "userRolesCtxDNAttributeName"; - - private static final String UID_ATTRIBUTE_ID_OPT = "uidAttributeID"; - - private static final String ROLE_ATTRIBUTE_ID_OPT = "roleAttributeID"; - - private static final String MATCH_ON_USER_DN_OPT = "matchOnUserDN"; - - private static final String ROLE_ATTRIBUTE_IS_DN_OPT = "roleAttributeIsDN"; - - private static final String ROLE_NAME_ATTRIBUTE_ID_OPT = "roleNameAttributeID"; - - private AuthenticationMethod method; - - public LDAPAuthenticator(AuthenticationMethod method) { - this.method = method; + private static UserManagementService service; + private static LdapService ldapService; + private static final String INITIAL_CONTEXT_FACTORY_VALUE = "com.sun.jndi.ldap.LdapCtxFactory"; + private Attributes attrs = null; + + public LDAPAuthenticator() { } + + private UserManagementService getService() { + if (service==null) { + WebApplicationContext ctx = WebApplicationContextUtils + .getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); + service = (UserManagementService) ctx.getBean("userManagementService"); + } + return service; + } + + private LdapService getLdapService() { + if (ldapService==null) { + WebApplicationContext ctx = WebApplicationContextUtils + .getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); + ldapService = (LdapService) ctx.getBean("ldapService"); + } + return ldapService; + } + public Attributes getAttrs() { + return attrs; + } + + public void setAttrs(Attributes attrs) { + this.attrs = attrs; + } + public boolean authenticate(String username, String inputPassword) { return authentication(username, inputPassword); } @@ -68,40 +88,64 @@ Properties env = new Properties(); // Load all authentication method parameters into env - env.setProperty(Context.INITIAL_CONTEXT_FACTORY, method.getParameterByName(Context.INITIAL_CONTEXT_FACTORY).getValue()); - env.setProperty(Context.SECURITY_AUTHENTICATION, method.getParameterByName(Context.SECURITY_AUTHENTICATION).getValue()); + env.setProperty(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY_VALUE); + env.setProperty(Context.SECURITY_AUTHENTICATION, Configuration.get(ConfigurationKeys.LDAP_SECURITY_AUTHENTICATION)); - String principalDNPrefix = method.getParameterByName(PRINCIPAL_DN_PREFIX_OPT).getValue(); - String principalDNSuffix = method.getParameterByName(PRINCIPAL_DN_SUFFIX_OPT).getValue(); + String principalDNPrefix = Configuration.get(ConfigurationKeys.LDAP_PRINCIPAL_DN_PREFIX); + String principalDNSuffix = Configuration.get(ConfigurationKeys.LDAP_PRINCIPAL_DN_SUFFIX); String userDN = principalDNPrefix + username + principalDNSuffix; env.setProperty(Context.SECURITY_PRINCIPAL, userDN); - env.setProperty(Context.PROVIDER_URL, method.getParameterByName(Context.PROVIDER_URL).getValue()); + env.setProperty(Context.PROVIDER_URL, Configuration.get(ConfigurationKeys.LDAP_PROVIDER_URL)); env.put(Context.SECURITY_CREDENTIALS, credential); Object originalTrustStore = System.getProperty("javax.net.ssl.trustStore"); Object originalTrustPass = System.getProperty("javax.net.ssl.trustStorePassword"); - // optional parameters - try { - env.setProperty(Context.SECURITY_PROTOCOL, method.getParameterByName(Context.SECURITY_PROTOCOL).getValue()); + String securityProtocol = Configuration.get(ConfigurationKeys.LDAP_SECURITY_PROTOCOL); + if (StringUtils.equals("ssl", securityProtocol)) { + env.setProperty(Context.SECURITY_PROTOCOL, securityProtocol); // FIXME: synchronization issue: dynamically load certificate into // system instead of overwritting it. - System.setProperty("javax.net.ssl.trustStore", method.getParameterByName("truststore.path").getValue()); - System.setProperty("javax.net.ssl.trustStorePassword", method.getParameterByName("truststore.password").getValue()); - } catch(NullPointerException e) { + System.setProperty("javax.net.ssl.trustStore", Configuration.get(ConfigurationKeys.LDAP_TRUSTSTORE_PATH)); + System.setProperty("javax.net.ssl.trustStorePassword", Configuration.get(ConfigurationKeys.LDAP_TRUSTSTORE_PASSWORD)); } log.debug("===> LDAP authenticator: " + env); InitialLdapContext ctx = null; try { - ctx = new InitialLdapContext(env, null);System.out.println(ctx); - log.debug("===> ldap context created: "+ctx); + ctx = new InitialLdapContext(env, null); + log.debug("===> LDAP context created: "+ctx); + Attributes attrs = ctx.getAttributes(userDN); + setAttrs(attrs); + + if (log.isDebugEnabled()) { + NamingEnumeration enumAttrs = attrs.getAll(); + while (enumAttrs.hasMoreElements()) { + log.debug(enumAttrs.next()); + } + } + + if (Configuration.getAsBoolean(ConfigurationKeys.LDAP_UPDATE_ON_LOGIN)) { + UserManagementService service = getService(); + User user = service.getUserByLogin(username); + if (user != null) { + // update user's attributes and org membership + getLdapService().updateLDAPUser(user, attrs); + getLdapService().addLDAPUser(attrs, user.getUserId()); + } + } + return true; + } catch (AuthenticationNotSupportedException e) { + log.error("===> Authentication mechanism not supported. Check your " + +ConfigurationKeys.LDAP_SECURITY_AUTHENTICATION+" parameter: " + +Configuration.get(ConfigurationKeys.LDAP_SECURITY_AUTHENTICATION)); + } catch (AuthenticationException e) { + log.info("===> Incorrect username ("+userDN+") or password ("+credential+"): "+e.getMessage()); } catch (Exception e) { - log.error("===> Ldap exception: " + e); - return false; + log.error("===> LDAP exception: " + e, e); } finally { try { @@ -118,7 +162,8 @@ log.error("===> gettting problem when closing context. Excetion: "+e); } } - + + return false; } } \ No newline at end of file Index: lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java,v diff -u -r1.14 -r1.14.2.1 --- lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java 30 May 2007 04:14:01 -0000 1.14 +++ lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java 18 Sep 2007 07:20:59 -0000 1.14.2.1 @@ -40,7 +40,6 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import javax.naming.InitialContext; @@ -53,60 +52,37 @@ import javax.sql.DataSource; import org.apache.log4j.Logger; -import org.lamsfoundation.lams.usermanagement.AuthenticationMethod; -import org.lamsfoundation.lams.usermanagement.AuthenticationMethodParameter; +import org.lamsfoundation.lams.usermanagement.AuthenticationMethodType; import org.lamsfoundation.lams.usermanagement.Role; import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.service.LdapService; import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.util.HashUtil; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.HttpSessionManager; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; public class UniversalLoginModule extends UsernamePasswordLoginModule { + private static Logger log = Logger.getLogger(UniversalLoginModule.class); - private static final String USE_OBJECT_CREDENTIAL_OPT = "useObjectCredential"; - - private static final String PRINCIPAL_DN_PREFIX_OPT = "principalDNPrefix"; - - private static final String PRINCIPAL_DN_SUFFIX_OPT = "principalDNSuffix"; - - private static final String ROLES_CTX_DN_OPT = "rolesCtxDN"; - - private static final String USER_ROLES_CTX_DN_ATTRIBUTE_ID_OPT = "userRolesCtxDNAttributeName"; - - private static final String UID_ATTRIBUTE_ID_OPT = "uidAttributeID"; - - private static final String ROLE_ATTRIBUTE_ID_OPT = "roleAttributeID"; - - private static final String MATCH_ON_USER_DN_OPT = "matchOnUserDN"; - - private static final String ROLE_ATTRIBUTE_IS_DN_OPT = "roleAttributeIsDN"; - - private static final String ROLE_NAME_ATTRIBUTE_ID_OPT = "roleNameAttributeID"; - public UniversalLoginModule() { } - private transient SimpleGroup userRoles = new SimpleGroup("Roles"); - protected String dsJndiName; - protected String rolesQuery; + protected String principalsQuery; - protected String propertyFilePath; - public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { super.initialize(subject, callbackHandler, sharedState, options); - - //from options to get path to property file -> authentication.xml - propertyFilePath = (String) options.get("authenticationPropertyFile"); - //load authentication property file - AuthenticationMethodConfigurer.setConfigFilePath(propertyFilePath); - + dsJndiName = (String)options.get("dsJndiName"); + principalsQuery = (String)options.get("principalsQuery"); + rolesQuery = (String)options.get("rolesQuery"); } protected boolean validatePassword(String inputPassword, @@ -123,61 +99,73 @@ try { String username = getUsername(); WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); - UserManagementService service = (UserManagementService) ctx.getBean("userManagementServiceTarget"); + UserManagementService service = (UserManagementService) ctx.getBean("userManagementService"); + LdapService ldapService = (LdapService) ctx.getBean("ldapService"); User user = service.getUserByLogin(username); log.debug("===> authenticating user: " + username); - if (user == null) - return false; + // LDAP user provisioning + if (user == null) { + // provision a new user by checking ldap server + if (Configuration.getAsBoolean(ConfigurationKeys.LDAP_PROVISIONING_ENABLED)) { + log.debug("===> LDAP provisioning is enabled, checking username against LDAP server..."); + LDAPAuthenticator ldap = new LDAPAuthenticator(); + isValid = ldap.authenticate(username, inputPassword); + if (isValid) { // create a new user + log.info("===> Creating new user for LDAP username: " + username); + if (ldapService.createLDAPUser(ldap.getAttrs())) { + user = service.getUserByLogin(username); + if (!ldapService.addLDAPUser(ldap.getAttrs(), user.getUserId())) { + log.error("===> Couldn't add LDAP user: "+username+" to organisation."); + } + } else { + log.error("===> Couldn't create new user for LDAP username: "+username); + return false; + } + } else { // didn't authenticate successfully with ldap + return false; + } + } else { + return false; + } + } + // disabled users can't login if (user.getDisabledFlag()) { log.debug("===> user is disabled."); return false; } - AuthenticationMethod method = null; - try { - method = user.getAuthenticationMethod(); - AuthenticationMethodConfigurer.configure(method); - - this.dsJndiName = method.getParameterByName("dsJndiName").getValue(); - this.rolesQuery = method.getParameterByName("rolesQuery").getValue(); - } catch (Exception e) { - log.debug("===>Exception : " + e); - return false; + // allow sysadmin to login as another user; in this case, the LAMS shared session + // will be present, allowing the following check to work + if (service.isUserSysAdmin()) { + isValid = true; } - - List parameters = method.getAuthenticationMethodParameters(); - - //for debug purpose only - for (int i = 0; i < parameters.size(); i++) { - AuthenticationMethodParameter mp = (AuthenticationMethodParameter) parameters.get(i); - log.debug("===>" + mp.getName() + " = " + mp.getValue()); - } - String type = method.getAuthenticationMethodType().getDescription(); - log.debug("===> authentication type :" + type); - if ("LDAP".equals(type)) { - LDAPAuthenticator authenticator = new LDAPAuthenticator(method); - isValid = authenticator.authenticate(username,inputPassword); - log.debug("===> LDAP :: user:" + username + ":" - + inputPassword + " authenticated! "); - } else if ("LAMS".equals(type)) { - DatabaseAuthenticator authenticator = new DatabaseAuthenticator(method); - isValid = authenticator.authenticate(username,inputPassword); - log.debug("===> LAMS:: user:" + username + ":" - + inputPassword + " authenticated! "); - } else if ("WEB_AUTH".equals(type)) { - log.debug("===> WEBAUTH: " + username + " type: " + type); - WebAuthAuthenticator authenticator = new WebAuthAuthenticator(); - log.debug("===> webauth authenticator is:" + authenticator); - isValid = authenticator.authenticate(username,inputPassword); - log.debug("===> WEBAUTH :: user:" + username + ":" - + inputPassword + " authenticated! "); - - } else { - log.debug("Unexpected authentication type!"); - return false; + // perform password checking according to user's authentication method + if (!isValid) { + String type = user.getAuthenticationMethod().getAuthenticationMethodType().getDescription(); + log.debug("===> authentication type: " + type); + if (AuthenticationMethodType.LDAP.equals(type)) { + LDAPAuthenticator authenticator = new LDAPAuthenticator(); + isValid = authenticator.authenticate(username,inputPassword); + // if ldap user profile has updated, udpate user object for dto below + user = service.getUserByLogin(username); + } else if (AuthenticationMethodType.LAMS.equals(type)) { + DatabaseAuthenticator authenticator = new DatabaseAuthenticator(dsJndiName, principalsQuery); + // if the password is not encrypted when sent from the jsp (e.g. when it is passed + // unencrypted to say, ldap) then encrypt it here when authenticating against local db + if (!Configuration.getAsBoolean(ConfigurationKeys.LDAP_ENCRYPT_PASSWORD_FROM_BROWSER)) { + inputPassword = HashUtil.sha1(inputPassword); + } + isValid = authenticator.authenticate(username,inputPassword); + } else if (AuthenticationMethodType.WEB_AUTH.equals(type)) { + WebAuthAuthenticator authenticator = new WebAuthAuthenticator(); + isValid = authenticator.authenticate(username,inputPassword); + } else { + log.error("===> Unexpected authentication type: "+type); + return false; + } } //if login is valid, register userDTO into session. if(isValid){ @@ -186,7 +174,7 @@ } } catch (Exception e) { e.printStackTrace(); - log.debug("===> exception: " + e,e); + log.error("===> exception: " + e,e); } } return isValid; @@ -211,7 +199,7 @@ InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(this.dsJndiName); - log.debug("===> getRoleSets() called: " + dsJndiName + ":" + rolesQuery); + //log.debug("===> getRoleSets() called: " + dsJndiName + ": " + rolesQuery); conn = ds.getConnection(); // Get the user role names ps = conn.prepareStatement(this.rolesQuery); @@ -248,25 +236,25 @@ // Assign minimal role if user has none if (name==null) { name = Role.LEARNER; - log.info("Found no roles"); + log.info("===> Found no roles"); } p = super.createIdentity(name); if (!groupMembers.contains(name)) { - log.info("Assign user to role " + p.getName()); + log.info("===> Assign user to role " + p.getName()); group.addMember(p); groupMembers.add(name); } if (name.equals(Role.SYSADMIN) || name.equals(Role.AUTHOR_ADMIN)) { p = super.createIdentity(Role.AUTHOR); - log.info("Found "+name); + log.info("===> Found "+name); if (!groupMembers.contains(Role.AUTHOR)) { - log.info("Assign user to role "+Role.AUTHOR); + log.info("===> Assign user to role "+Role.AUTHOR); group.addMember(p); groupMembers.add(Role.AUTHOR); } } } catch (Exception e) { - log.debug("Failed to create principal: " + name, e); + log.debug("===> Failed to create principal: " + name, e); } } while (rs.next()); } catch (NamingException ex) { Index: lams_central/src/java/org/lamsfoundation/lams/security/WebAuthServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/security/Attic/WebAuthServlet.java,v diff -u -r1.4 -r1.4.8.1 --- lams_central/src/java/org/lamsfoundation/lams/security/WebAuthServlet.java 17 Sep 2006 06:12:05 -0000 1.4 +++ lams_central/src/java/org/lamsfoundation/lams/security/WebAuthServlet.java 18 Sep 2007 07:20:59 -0000 1.4.8.1 @@ -63,7 +63,7 @@ else { WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext()); - UserManagementService service = (UserManagementService)ctx.getBean("userManagementServiceTarget"); + UserManagementService service = (UserManagementService)ctx.getBean("userManagementService"); User webAuthUser = service.getUserByLogin(webAuthUserID); if (webAuthUser != null) Index: lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java,v diff -u -r1.25 -r1.25.2.1 --- lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java 9 May 2007 01:03:36 -0000 1.25 +++ lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java 18 Sep 2007 07:20:58 -0000 1.25.2.1 @@ -78,7 +78,7 @@ private IUserManagementService getService(){ if(service==null){ WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); - service = (IUserManagementService) ctx.getBean("userManagementServiceTarget"); + service = (IUserManagementService) ctx.getBean("userManagementService"); } return service; } Index: lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java,v diff -u -r1.36 -r1.36.2.1 --- lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java 21 Feb 2007 05:55:16 -0000 1.36 +++ lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java 18 Sep 2007 07:20:58 -0000 1.36.2.1 @@ -74,6 +74,7 @@ * @struts.action-forward name="password" path="/password.do" * @struts.action-forward name="passwordChanged" path=".passwordChangeOk" * @struts.action-forward name="portrait" path="/portrait.do" + * @struts.action-forward name="lessons" path="/profile.do?method=lessons" * @struts.action-forward name="content" path="/indexContent.jsp" */ public class IndexAction extends Action { @@ -117,6 +118,8 @@ return mapping.findForward("passwordChanged"); } else if (StringUtils.equals(tab, "portrait")) { return mapping.findForward("portrait"); + } else if (StringUtils.equals(tab, "lessons")) { + return mapping.findForward("lessons"); } else if (StringUtils.equals(tab, "community")) { request.setAttribute("tab", tab); return mapping.findForward("community"); @@ -317,7 +320,7 @@ private IUserManagementService getService(){ if(service==null){ WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); - service = (IUserManagementService) ctx.getBean("userManagementServiceTarget"); + service = (IUserManagementService) ctx.getBean("userManagementService"); } return service; } Index: lams_central/src/java/org/lamsfoundation/lams/web/IndexLessonBean.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/Attic/IndexLessonBean.java,v diff -u -r1.5 -r1.5.8.1 --- lams_central/src/java/org/lamsfoundation/lams/web/IndexLessonBean.java 1 Nov 2006 05:28:13 -0000 1.5 +++ lams_central/src/java/org/lamsfoundation/lams/web/IndexLessonBean.java 18 Sep 2007 07:20:58 -0000 1.5.8.1 @@ -41,6 +41,11 @@ private Integer state; private List links; + public IndexLessonBean(String name, String url) { + this.name = name; + this.url = url; + } + public IndexLessonBean(String name, List links) { this.name = name; this.links = links; Index: lams_central/src/java/org/lamsfoundation/lams/web/IndexOrgBean.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/Attic/IndexOrgBean.java,v diff -u -r1.4 -r1.4.2.1 --- lams_central/src/java/org/lamsfoundation/lams/web/IndexOrgBean.java 8 Feb 2007 00:34:36 -0000 1.4 +++ lams_central/src/java/org/lamsfoundation/lams/web/IndexOrgBean.java 18 Sep 2007 07:20:58 -0000 1.4.2.1 @@ -26,8 +26,6 @@ import java.util.Date; import java.util.List; -import org.lamsfoundation.lams.usermanagement.Role; - /** * @version * @@ -133,5 +131,13 @@ IndexOrgBean b = (IndexOrgBean)indexOrgBean; return name.compareTo(b.getName()); } + + public void addLesson(IndexLessonBean lesson) { + lessons.add(lesson); + } + + public void addChildOrgBean(IndexOrgBean orgBean) { + childIndexOrgBeans.add(orgBean); + } } Index: lams_central/src/java/org/lamsfoundation/lams/web/LoginAsAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/LoginAsAction.java,v diff -u -r1.1 -r1.1.4.1 --- lams_central/src/java/org/lamsfoundation/lams/web/LoginAsAction.java 24 May 2007 07:15:59 -0000 1.1 +++ lams_central/src/java/org/lamsfoundation/lams/web/LoginAsAction.java 18 Sep 2007 07:20:58 -0000 1.1.4.1 @@ -23,17 +23,8 @@ /* $Id$ */ package org.lamsfoundation.lams.web; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.security.auth.login.FailedLoginException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; @@ -42,7 +33,6 @@ import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; -import org.lamsfoundation.lams.web.session.SessionManager; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; @@ -54,30 +44,25 @@ */ public class LoginAsAction extends Action { - private static final String JNDI_DATASOURCE = "java:/jdbc/lams-ds"; - private static final String PASSWORD_QUERY = "select password from lams_user where login=?"; - public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); - IUserManagementService service = (IUserManagementService) ctx.getBean("userManagementServiceTarget"); + IUserManagementService service = (IUserManagementService) ctx.getBean("userManagementService"); MessageService messageService = (MessageService)ctx.getBean("centralMessageService"); String login = WebUtil.readStrParam(request, "login", false); if (service.isUserSysAdmin()) { if (login!=null && login.trim().length()>0) { if (service.getUserByLogin(login)!=null) { - // logout + // logout, but not the LAMS shared session; needed by UniversalLoginModule + // to check for sysadmin role request.getSession().invalidate(); - SessionManager.getSession().invalidate(); - // send to index page; session attributes will be cleared there - String pass = getUserPassword(login); + // send to index page; the following attribute will be cleared there request.getSession().setAttribute("login", login); - request.getSession().setAttribute("pass", pass); return (new ActionForward("/index.jsp")); } } @@ -90,31 +75,4 @@ return mapping.findForward("usersearch"); } - // Copied from LoginRequestServlet.java - // using JDBC connection to prevent the caching of passwords by hibernate - private String getUserPassword(String username) throws FailedLoginException, NamingException, - SQLException { - InitialContext ctx = new InitialContext(); - - DataSource ds = (DataSource) ctx.lookup(JNDI_DATASOURCE); - Connection conn = null; - String password = null; - try { - conn = ds.getConnection(); - PreparedStatement ps = conn.prepareStatement(PASSWORD_QUERY); - ps.setString(1, username); - ResultSet rs = ps.executeQuery(); - - // check if there is any result - if (rs.next() == false) - throw new FailedLoginException("invalid username"); - - password = rs.getString(1); - rs.close(); - } finally { - if (conn != null && !conn.isClosed()) - conn.close(); - } - return password; - } } Index: lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java,v diff -u -r1.11 -r1.11.2.1 --- lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java 7 Feb 2007 04:30:04 -0000 1.11 +++ lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java 18 Sep 2007 07:20:58 -0000 1.11.2.1 @@ -102,7 +102,7 @@ { //WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession(true).getServletContext()); WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(getServlet().getServletContext()); - UserManagementService service = (UserManagementService)ctx.getBean("userManagementServiceTarget"); + UserManagementService service = (UserManagementService)ctx.getBean("userManagementService"); User user = service.getUserByLogin(login); if(!user.getPassword().equals(HashUtil.sha1(oldPassword))) Index: lams_central/src/java/org/lamsfoundation/lams/web/PortraitAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/PortraitAction.java,v diff -u -r1.4 -r1.4.8.1 --- lams_central/src/java/org/lamsfoundation/lams/web/PortraitAction.java 6 Nov 2006 00:43:18 -0000 1.4 +++ lams_central/src/java/org/lamsfoundation/lams/web/PortraitAction.java 18 Sep 2007 07:20:58 -0000 1.4.8.1 @@ -68,7 +68,7 @@ private IUserManagementService getService(){ if(service==null){ WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); - service = (IUserManagementService) ctx.getBean("userManagementServiceTarget"); + service = (IUserManagementService) ctx.getBean("userManagementService"); } return service; } Index: lams_central/src/java/org/lamsfoundation/lams/web/PortraitSaveAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/PortraitSaveAction.java,v diff -u -r1.7 -r1.7.8.1 --- lams_central/src/java/org/lamsfoundation/lams/web/PortraitSaveAction.java 6 Nov 2006 00:43:18 -0000 1.7 +++ lams_central/src/java/org/lamsfoundation/lams/web/PortraitSaveAction.java 18 Sep 2007 07:20:58 -0000 1.7.8.1 @@ -133,7 +133,7 @@ private IUserManagementService getService(){ if(service==null){ WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); - service = (IUserManagementService) ctx.getBean("userManagementServiceTarget"); + service = (IUserManagementService) ctx.getBean("userManagementService"); } return service; } Index: lams_central/src/java/org/lamsfoundation/lams/web/ProfileAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/ProfileAction.java,v diff -u -r1.8 -r1.8.8.1 --- lams_central/src/java/org/lamsfoundation/lams/web/ProfileAction.java 6 Nov 2006 00:43:18 -0000 1.8 +++ lams_central/src/java/org/lamsfoundation/lams/web/ProfileAction.java 18 Sep 2007 07:20:58 -0000 1.8.8.1 @@ -22,18 +22,25 @@ */ package org.lamsfoundation.lams.web; +import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.DynaActionForm; +import org.lamsfoundation.lams.learning.service.ICoreLearnerService; +import org.lamsfoundation.lams.lesson.dto.LessonDTO; +import org.lamsfoundation.lams.usermanagement.Organisation; +import org.lamsfoundation.lams.usermanagement.OrganisationType; import org.lamsfoundation.lams.usermanagement.SupportedLocale; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; @@ -61,13 +68,15 @@ * validate="false" * * @struts:action-forward name="view" path=".profile" + * @struts:action-forward name="lessons" path=".lessons" * @struts:action-forward name="edit" path=".editprofile" */ public class ProfileAction extends LamsDispatchAction { private static Logger log = Logger.getLogger(ProfileAction.class); private static IUserManagementService service; private static List locales; + private static ICoreLearnerService learnerService; public ActionForward view(ActionMapping mapping, ActionForm form, @@ -82,9 +91,78 @@ request.setAttribute("email", (email!=null ? email : "")); request.setAttribute("portraitUuid", (requestor.getPortraitUuid()==null ? 0 : requestor.getPortraitUuid())); request.setAttribute("tab", "profile"); + return mapping.findForward("view"); } + public ActionForward lessons(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws Exception { + + // list all active lessons for this learner (single sql query) + User requestor = (User)getService().getUserByLogin(request.getRemoteUser()); + LessonDTO[] lessons = getLearnerService().getActiveLessonsFor(requestor.getUserId()); + + // make org-sorted beans out of the lessons + HashMap orgBeansMap = new HashMap(); + for (LessonDTO lesson : lessons) { + Integer orgId = lesson.getOrganisationID(); + Organisation org = (Organisation)getService().findById(Organisation.class, orgId); + Integer orgTypeId = org.getOrganisationType().getOrganisationTypeId(); + IndexLessonBean lessonBean = new IndexLessonBean( + lesson.getLessonName(), + "javascript:openLearner("+lesson.getLessonID()+")" + ); + log.debug("Lesson: "+lesson.getLessonName()); + + // insert or update bean if it is a course + if (orgTypeId.equals(OrganisationType.COURSE_TYPE)) { + IndexOrgBean orgBean = (!orgBeansMap.containsKey(orgId)) + ? new IndexOrgBean(org.getName(), orgTypeId) + : orgBeansMap.get(orgId); + orgBean.addLesson(lessonBean); + orgBeansMap.put(orgId, orgBean); + } else if (orgTypeId.equals(OrganisationType.CLASS_TYPE)) { + + // if it is a class, find existing or create new parent bean + Organisation parentOrg = org.getParentOrganisation(); + Integer parentOrgId = parentOrg.getOrganisationId(); + IndexOrgBean parentOrgBean = (!orgBeansMap.containsKey(parentOrgId)) + ? new IndexOrgBean(parentOrg.getName(), OrganisationType.COURSE_TYPE) + : orgBeansMap.get(parentOrgId); + // create new bean for class, or use existing bean + IndexOrgBean orgBean = new IndexOrgBean(org.getName(), orgTypeId); + List childOrgBeans = parentOrgBean.getChildIndexOrgBeans(); + if (childOrgBeans.contains(orgBean)) { + orgBean = getOrgBean(org.getName(), childOrgBeans); + } + // add lesson to class bean + orgBean.addLesson(lessonBean); + // set the parent bean + parentOrgBean.addChildOrgBean(orgBean); + orgBeansMap.put(parentOrgId, parentOrgBean); + } + } + + ArrayList beans = new ArrayList(orgBeansMap.values()); + Collections.sort(beans); + + request.setAttribute("beans", beans); + request.setAttribute("tab", "profile"); + + return mapping.findForward("lessons"); + } + + private IndexOrgBean getOrgBean(String name, List list) { + for (IndexOrgBean bean : list) { + if (StringUtils.equals(name, bean.getName())) { + return bean; + } + } + return null; + } + public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -104,10 +182,18 @@ private IUserManagementService getService(){ if(service==null){ WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); - service = (IUserManagementService) ctx.getBean("userManagementServiceTarget"); + service = (IUserManagementService) ctx.getBean("userManagementService"); locales = getService().findAll(SupportedLocale.class); Collections.sort(locales); } return service; } + + private ICoreLearnerService getLearnerService(){ + if(learnerService==null){ + WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); + learnerService = (ICoreLearnerService) ctx.getBean("learnerService"); + } + return learnerService; + } } Index: lams_central/src/java/org/lamsfoundation/lams/web/ProfileSaveAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/ProfileSaveAction.java,v diff -u -r1.8 -r1.8.2.1 --- lams_central/src/java/org/lamsfoundation/lams/web/ProfileSaveAction.java 24 May 2007 00:59:48 -0000 1.8 +++ lams_central/src/java/org/lamsfoundation/lams/web/ProfileSaveAction.java 18 Sep 2007 07:20:58 -0000 1.8.2.1 @@ -40,6 +40,7 @@ import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; import org.apache.struts.action.DynaActionForm; +import org.lamsfoundation.lams.usermanagement.AuthenticationMethod; import org.lamsfoundation.lams.usermanagement.SupportedLocale; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; @@ -89,7 +90,7 @@ return (mapping.getInputForward()); } - // (dyna)form validation + // (dyna)form validation if ((userForm.get("firstName") == null) || (userForm.getString("firstName").trim().length() == 0)) { errors.add("firstName", new ActionMessage("error.firstname.required")); } @@ -128,7 +129,7 @@ private IUserManagementService getService(){ if(service==null){ WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); - service = (IUserManagementService) ctx.getBean("userManagementServiceTarget"); + service = (IUserManagementService) ctx.getBean("userManagementService"); } return service; } Index: lams_central/web/editprofile.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/editprofile.jsp,v diff -u -r1.9 -r1.9.2.1 --- lams_central/web/editprofile.jsp 14 Feb 2007 11:31:48 -0000 1.9 +++ lams_central/web/editprofile.jsp 18 Sep 2007 07:20:58 -0000 1.9.2.1 @@ -5,6 +5,8 @@ <%@ taglib uri="tags-bean" prefix="bean" %> <%@ taglib uri="tags-logic" prefix="logic" %> <%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ page import="org.lamsfoundation.lams.usermanagement.AuthenticationMethod" %> @@ -22,7 +24,11 @@
- + + +<%= AuthenticationMethod.DB %> + + @@ -87,7 +93,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_central/web/WEB-INF/tiles/tiles-defs.xml =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/WEB-INF/tiles/Attic/tiles-defs.xml,v diff -u -r1.12 -r1.12.8.1 --- lams_central/web/WEB-INF/tiles/tiles-defs.xml 17 Nov 2006 03:11:31 -0000 1.12 +++ lams_central/web/WEB-INF/tiles/tiles-defs.xml 18 Sep 2007 07:20:59 -0000 1.12.8.1 @@ -26,6 +26,10 @@ + + + + Index: lams_common/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/build.xml,v diff -u -r1.58 -r1.58.4.1 --- lams_common/build.xml 23 Apr 2007 01:14:22 -0000 1.58 +++ lams_common/build.xml 18 Sep 2007 07:20:54 -0000 1.58.4.1 @@ -152,7 +152,6 @@ - @@ -163,20 +162,8 @@ - - - - - - - - - - - - - + @@ -191,11 +178,6 @@ - - - - - @@ -335,7 +317,9 @@ - + + + Index: lams_common/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_common/conf/language/lams/ApplicationResources.properties,v diff -u -r1.1 -r1.1.8.1 --- lams_common/conf/language/lams/ApplicationResources.properties 17 Feb 2007 12:04:00 -0000 1.1 +++ lams_common/conf/language/lams/ApplicationResources.properties 18 Sep 2007 07:20:52 -0000 1.1.8.1 @@ -36,6 +36,10 @@ error.import.tool.service.fail =Unable to import tool content for tool {0}. Caused by {1}. error.no.valid.tool =No valid tools in this learning design. import.shareresources.warning =The sequence contains one or more Share Resources activities. Please check these activities as any file or uploaded websites in the activity will be invalid and will cause an error for the learners. Links to external websites should not cause any errors. +validation.error.grouping.missing=Grouping object for the grouping activity is missing. +validation.error.group.count.mismatch=Grouping has more groups than the requested number of groups. +audit.user.password.change =Password changed for: {0} +audit.user.create =Created user: {0}, Full Name: {1} #======= End labels: Exported 30 labels for en AU ===== Index: lams_common/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_common/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u -r1.1 -r1.1.8.1 --- lams_common/conf/language/lams/ApplicationResources_en_AU.properties 17 Feb 2007 12:04:00 -0000 1.1 +++ lams_common/conf/language/lams/ApplicationResources_en_AU.properties 18 Sep 2007 07:20:52 -0000 1.1.8.1 @@ -36,6 +36,10 @@ error.import.tool.service.fail =Unable to import tool content for tool {0}. Caused by {1}. error.no.valid.tool =No valid tools in this learning design. import.shareresources.warning =The sequence contains one or more Share Resources activities. Please check these activities as any file or uploaded websites in the activity will be invalid and will cause an error for the learners. Links to external websites should not cause any errors. +validation.error.grouping.missing=Grouping object for the grouping activity is missing. +validation.error.group.count.mismatch=Grouping has more groups than the requested number of groups. +audit.user.password.change =Password changed for: {0} +audit.user.create =Created user: {0}, Full Name: {1} #======= End labels: Exported 30 labels for en AU ===== Index: lams_common/db/sql/insert_lams_unix_config_data.sql =================================================================== RCS file: /usr/local/cvsroot/lams_common/db/sql/insert_lams_unix_config_data.sql,v diff -u -r1.6.4.1 -r1.6.4.1.2.1 --- lams_common/db/sql/insert_lams_unix_config_data.sql 20 Jun 2007 23:02:33 -0000 1.6.4.1 +++ lams_common/db/sql/insert_lams_unix_config_data.sql 18 Sep 2007 07:20:55 -0000 1.6.4.1.2.1 @@ -1,6 +1,6 @@ insert into lams_configuration (config_key, config_value) values ('ServerURL','http://shaun.melcoe.mq.edu.au/lams/'); insert into lams_configuration (config_key, config_value) values ('ServerURLContextPath','lams/'); -insert into lams_configuration (config_key, config_value) values ('Version','2.0.4'); +insert into lams_configuration (config_key, config_value) values ('Version','2.0.5'); insert into lams_configuration (config_key, config_value) values ('TempDir','/var/opt/lams/temp'); insert into lams_configuration (config_key, config_value) values ('DumpDir','/var/opt/lams/dump'); insert into lams_configuration (config_key, config_value) values ('EARDir','/usr/local/jboss-4.0.2/server/default/deploy/lams.ear'); @@ -31,4 +31,30 @@ insert into lams_configuration (config_key, config_value) values ('DefaultHTMLTheme','defaultHTML'); insert into lams_configuration (config_key, config_value) values ('AllowDirectLessonLaunch','false'); insert into lams_configuration (config_key, config_value) values ('LAMS_Community_enable','false'); -insert into lams_configuration (config_key, config_value) values ('AllowLiveEdit','true'); \ No newline at end of file +insert into lams_configuration (config_key, config_value) values ('AllowLiveEdit','true'); +insert into lams_configuration (config_key, config_value) values ('LDAPProvisioningEnabled','true'); +insert into lams_configuration (config_key, config_value) values ('LDAPProviderURL','ldap://192.168.111.15'); +insert into lams_configuration (config_key, config_value) values ('LDAPSecurityAuthentication','simple'); +insert into lams_configuration (config_key, config_value) values ('LDAPPrincipalDNPrefix','cn='); +insert into lams_configuration (config_key, config_value) values ('LDAPPrincipalDNSuffix',',ou=Users,dc=melcoe,dc=mq,dc=edu,dc=au'); +insert into lams_configuration (config_key, config_value) values ('LDAPSecurityProtocol',''); +insert into lams_configuration (config_key, config_value) values ('LDAPTruststorePath',''); +insert into lams_configuration (config_key, config_value) values ('LDAPTruststorePassword',''); +insert into lams_configuration (config_key, config_value) values ('LDAPLoginAttr','uid'); +insert into lams_configuration (config_key, config_value) values ('LDAPFNameAttr','givenName'); +insert into lams_configuration (config_key, config_value) values ('LDAPLNameAttr','sn'); +insert into lams_configuration (config_key, config_value) values ('LDAPEmailAttr','mail'); +insert into lams_configuration (config_key, config_value) values ('LDAPPhoneAttr','telephoneNumber'); +insert into lams_configuration (config_key, config_value) values ('LDAPFaxAttr','facsimileTelephoneNumber'); +insert into lams_configuration (config_key, config_value) values ('LDAPMobileAttr','mobile'); +insert into lams_configuration (config_key, config_value) values ('LDAPOrgAttr','deetITSchoolCode'); +insert into lams_configuration (config_key, config_value) values ('LDAPRolesAttr','memberOf'); +insert into lams_configuration (config_key, config_value) values ('LDAPLearnerMap','Student;SchoolSupportStaff;Teacher;SeniorStaff;Principal'); +insert into lams_configuration (config_key, config_value) values ('LDAPMonitorMap','SchoolSupportStaff;Teacher;SeniorStaff;Principal'); +insert into lams_configuration (config_key, config_value) values ('LDAPAuthorMap','Teacher;SeniorStaff;Principal'); +insert into lams_configuration (config_key, config_value) values ('LDAPGroupAdminMap','Teacher;SeniorStaff'); +insert into lams_configuration (config_key, config_value) values ('LDAPGroupManagerMap','Principal'); +insert into lams_configuration (config_key, config_value) values ('LDAPUpdateOnLogin', 'true'); +insert into lams_configuration (config_key, config_value) values ('LDAPOrgField', 'code'); +insert into lams_configuration (config_key, config_value) values ('LDAPOnlyOneOrg', 'true'); +insert into lams_configuration (config_key, config_value) values ('LDAPEncryptPasswordFromBrowser', 'false'); \ No newline at end of file Index: lams_common/db/sql/insert_lams_windows_config_data.sql =================================================================== RCS file: /usr/local/cvsroot/lams_common/db/sql/insert_lams_windows_config_data.sql,v diff -u -r1.3.4.1 -r1.3.4.1.2.1 --- lams_common/db/sql/insert_lams_windows_config_data.sql 20 Jun 2007 23:02:33 -0000 1.3.4.1 +++ lams_common/db/sql/insert_lams_windows_config_data.sql 18 Sep 2007 07:20:55 -0000 1.3.4.1.2.1 @@ -1,6 +1,6 @@ insert into lams_configuration (config_key, config_value) values ('ServerURL','http://localhost:8080/lams/'); insert into lams_configuration (config_key, config_value) values ('ServerURLContextPath','lams/'); -insert into lams_configuration (config_key, config_value) values ('Version','2.0.4'); +insert into lams_configuration (config_key, config_value) values ('Version','2.0.5'); insert into lams_configuration (config_key, config_value) values ('TempDir','C:/lams/temp'); insert into lams_configuration (config_key, config_value) values ('DumpDir','C:/lams/dump'); insert into lams_configuration (config_key, config_value) values ('EARDir','C:/jboss-4.0.2/server/default/deploy/lams.ear'); @@ -31,4 +31,30 @@ insert into lams_configuration (config_key, config_value) values ('DefaultHTMLTheme','defaultHTML'); insert into lams_configuration (config_key, config_value) values ('AllowDirectLessonLaunch','false'); insert into lams_configuration (config_key, config_value) values ('LAMS_Community_enable','false'); -insert into lams_configuration (config_key, config_value) values ('AllowLiveEdit','true'); \ No newline at end of file +insert into lams_configuration (config_key, config_value) values ('AllowLiveEdit','true'); +insert into lams_configuration (config_key, config_value) values ('LDAPProvisioningEnabled','true'); +insert into lams_configuration (config_key, config_value) values ('LDAPProviderURL','ldap://192.168.111.15'); +insert into lams_configuration (config_key, config_value) values ('LDAPSecurityAuthentication','simple'); +insert into lams_configuration (config_key, config_value) values ('LDAPPrincipalDNPrefix','cn='); +insert into lams_configuration (config_key, config_value) values ('LDAPPrincipalDNSuffix',',ou=Users,dc=melcoe,dc=mq,dc=edu,dc=au'); +insert into lams_configuration (config_key, config_value) values ('LDAPSecurityProtocol',''); +insert into lams_configuration (config_key, config_value) values ('LDAPTruststorePath',''); +insert into lams_configuration (config_key, config_value) values ('LDAPTruststorePassword',''); +insert into lams_configuration (config_key, config_value) values ('LDAPLoginAttr','uid'); +insert into lams_configuration (config_key, config_value) values ('LDAPFNameAttr','givenName'); +insert into lams_configuration (config_key, config_value) values ('LDAPLNameAttr','sn'); +insert into lams_configuration (config_key, config_value) values ('LDAPEmailAttr','mail'); +insert into lams_configuration (config_key, config_value) values ('LDAPPhoneAttr','telephoneNumber'); +insert into lams_configuration (config_key, config_value) values ('LDAPFaxAttr','facsimileTelephoneNumber'); +insert into lams_configuration (config_key, config_value) values ('LDAPMobileAttr','mobile'); +insert into lams_configuration (config_key, config_value) values ('LDAPOrgAttr','deetITSchoolCode'); +insert into lams_configuration (config_key, config_value) values ('LDAPRolesAttr','memberOf'); +insert into lams_configuration (config_key, config_value) values ('LDAPLearnerMap','Student;SchoolSupportStaff;Teacher;SeniorStaff;Principal'); +insert into lams_configuration (config_key, config_value) values ('LDAPMonitorMap','SchoolSupportStaff;Teacher;SeniorStaff;Principal'); +insert into lams_configuration (config_key, config_value) values ('LDAPAuthorMap','Teacher;SeniorStaff;Principal'); +insert into lams_configuration (config_key, config_value) values ('LDAPGroupAdminMap','Teacher;SeniorStaff'); +insert into lams_configuration (config_key, config_value) values ('LDAPGroupManagerMap','Principal'); +insert into lams_configuration (config_key, config_value) values ('LDAPUpdateOnLogin', 'true'); +insert into lams_configuration (config_key, config_value) values ('LDAPOrgField', 'code'); +insert into lams_configuration (config_key, config_value) values ('LDAPOnlyOneOrg', 'true'); +insert into lams_configuration (config_key, config_value) values ('LDAPEncryptPasswordFromBrowser', 'false'); \ No newline at end of file Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_common/db/sql/updatescripts/alter_2_0_5_ldap.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/src/java/org/lamsfoundation/lams/commonContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/commonContext.xml,v diff -u -r1.51 -r1.51.6.1 --- lams_common/src/java/org/lamsfoundation/lams/commonContext.xml 2 Jan 2007 06:04:34 -0000 1.51 +++ lams_common/src/java/org/lamsfoundation/lams/commonContext.xml 18 Sep 2007 07:20:55 -0000 1.51.6.1 @@ -113,6 +113,9 @@ PROPAGATION_REQUIRED PROPAGATION_REQUIRED PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED Index: lams_common/src/java/org/lamsfoundation/lams/usermanagement/AuthenticationMethod.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/usermanagement/AuthenticationMethod.java,v diff -u -r1.7 -r1.7.10.1 --- lams_common/src/java/org/lamsfoundation/lams/usermanagement/AuthenticationMethod.java 17 Sep 2006 06:14:17 -0000 1.7 +++ lams_common/src/java/org/lamsfoundation/lams/usermanagement/AuthenticationMethod.java 18 Sep 2007 07:20:51 -0000 1.7.10.1 @@ -25,7 +25,6 @@ import java.io.Serializable; import java.util.Set; -import java.util.List; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; @@ -56,8 +55,6 @@ private Set users; private boolean enabled = true; - - private List authenticationMethodParameters; /** full constructor */ public AuthenticationMethod(String authenticationMethodName, AuthenticationMethodType authenticationMethodType, Set users) { @@ -148,30 +145,7 @@ public void setEnabled(boolean enabled) { this.enabled = enabled; } - - /** - * @return Returns the authenticationMethodParameters. - */ - public List getAuthenticationMethodParameters() { - return authenticationMethodParameters; - } - /** - * @param authenticationMethodParameters The authenticationMethodParameters to set. - */ - public void setAuthenticationMethodParameters( - List authenticationMethodParameters) { - this.authenticationMethodParameters = authenticationMethodParameters; - } - public AuthenticationMethodParameter getParameterByName(String name){ - for(int i=0; i rolesList); + public void setRolesForUserOrganisation(User user, Integer organisationId, List rolesList); /** * Returns list of roles suitable for the given orgType. @@ -377,4 +378,26 @@ * @return */ public Integer getCountRoleForSystem(Integer roleId); + + /** + * Get default flash theme of server. + * @return default flash theme object + */ + public CSSThemeVisualElement getDefaultFlashTheme(); + + /** + * Get default html theme of server. + * @return default html theme object + */ + public CSSThemeVisualElement getDefaultHtmlTheme(); + + /** + * Get default server locale. + * @return server default supported locale object + */ + public SupportedLocale getDefaultLocale(); + + public void auditPasswordChanged(User user, String moduleName); + + public void auditUserCreated(User user, String moduleName); } \ No newline at end of file Index: lams_common/src/java/org/lamsfoundation/lams/usermanagement/service/UserManagementService.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/usermanagement/service/UserManagementService.java,v diff -u -r1.75 -r1.75.4.1 --- lams_common/src/java/org/lamsfoundation/lams/usermanagement/service/UserManagementService.java 23 May 2007 00:51:44 -0000 1.75 +++ lams_common/src/java/org/lamsfoundation/lams/usermanagement/service/UserManagementService.java 18 Sep 2007 07:20:53 -0000 1.75.4.1 @@ -38,6 +38,7 @@ import org.apache.log4j.Logger; import org.lamsfoundation.lams.dao.IBaseDAO; import org.lamsfoundation.lams.learningdesign.dao.IGroupDAO; +import org.lamsfoundation.lams.themes.CSSThemeVisualElement; import org.lamsfoundation.lams.usermanagement.Organisation; import org.lamsfoundation.lams.usermanagement.OrganisationType; import org.lamsfoundation.lams.usermanagement.Role; @@ -54,10 +55,17 @@ import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.usermanagement.dto.UserFlashDTO; import org.lamsfoundation.lams.usermanagement.dto.UserManageBean; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; import org.lamsfoundation.lams.util.HashUtil; import org.lamsfoundation.lams.util.MessageService; +import org.lamsfoundation.lams.util.audit.AuditService; +import org.lamsfoundation.lams.util.audit.IAuditService; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.HttpSessionManager; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; /** *

@@ -81,6 +89,15 @@ private IGroupDAO groupDAO; private IRoleDAO roleDAO; protected MessageService messageService; + private static IAuditService auditService; + + private IAuditService getAuditService() { + if (auditService == null) { + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); + auditService = (IAuditService) ctx.getBean("auditService"); + } + return auditService; + } /** * Set i18n MessageService @@ -332,17 +349,20 @@ Organisation organisation = (Organisation)baseDAO.find(Organisation.class,organisationID); if (organisation != null) { - Iterator iterator = organisation.getUserOrganisations().iterator(); - while (iterator.hasNext()) { - UserOrganisation userOrganisation = (UserOrganisation) iterator.next(); - Iterator userOrganisationRoleIterator = userOrganisation.getUserOrganisationRoles().iterator(); - while (userOrganisationRoleIterator.hasNext()) { - UserOrganisationRole userOrganisationRole = (UserOrganisationRole) userOrganisationRoleIterator.next(); - if (userOrganisationRole.getRole().getName().equals(roleName)) - if(isFlashCall) - users.add(userOrganisation.getUser().getUserFlashDTO()); - else - users.add(userOrganisation.getUser().getUserDTO()); + Set uos = organisation.getUserOrganisations(); + if (uos != null) { + Iterator iterator = uos.iterator(); + while (iterator.hasNext()) { + UserOrganisation userOrganisation = (UserOrganisation) iterator.next(); + Iterator userOrganisationRoleIterator = userOrganisation.getUserOrganisationRoles().iterator(); + while (userOrganisationRoleIterator.hasNext()) { + UserOrganisationRole userOrganisationRole = (UserOrganisationRole) userOrganisationRoleIterator.next(); + if (userOrganisationRole.getRole().getName().equals(roleName)) + if(isFlashCall) + users.add(userOrganisation.getUser().getUserFlashDTO()); + else + users.add(userOrganisation.getUser().getUserDTO()); + } } } } @@ -482,6 +502,7 @@ Organisation pOrg = organisation.getParentOrganisation(); // set parent's child orgs Set children = pOrg.getChildOrganisations(); + if (children==null) children = new HashSet(); children.add(organisation); pOrg.setChildOrganisations(children); // get course managers and give them staff role in this new class @@ -647,10 +668,22 @@ /** * (non-Javadoc) - * @see org.lamsfoundation.lams.usermanagement.service.IUserManagementService#setRolesForUserOrganisation(org.lamsfoundation.lams.usermanagement.User, org.lamsfoundation.lams.usermanagement.Organisation, java.util.List) + * @see org.lamsfoundation.lams.usermanagement.service.IUserManagementService#setRolesForUserOrganisation(org.lamsfoundation.lams.usermanagement.User, java.lang.Integer, java.util.List) */ - public void setRolesForUserOrganisation(User user, Organisation org, List rolesList) { + public void setRolesForUserOrganisation(User user, Integer organisationId, List rolesList) { + + // Don't pass in the org from the web layer. The import for roles doesn't use the HIbernate open session + // filter, so it may throw a lazy loading exception when it tried to access the org.UserOrganisations set + // if org has come from the web layer. + Organisation org = (Organisation) findById(Organisation.class, organisationId); + setRolesForUserOrganisation(user, org, rolesList); + } + + private void setRolesForUserOrganisation(User user, Organisation org, List rolesList) { + // The private version of setRolesForUserOrganisation can pass around the org safely as we are within + // our transation, so no lazy loading errors. This is more efficient for recursive calls to this method. + UserOrganisation uo = getUserOrganisation(user.getUserId(), org.getOrganisationId()); if (uo == null) { uo = new UserOrganisation(user, org); @@ -861,4 +894,37 @@ else return new Integer(0); } + + public CSSThemeVisualElement getDefaultFlashTheme() { + String flashName = Configuration.get(ConfigurationKeys.DEFAULT_FLASH_THEME); + List list = findByProperty(CSSThemeVisualElement.class, "name", flashName); + return (list!=null ? (CSSThemeVisualElement)list.get(0) : null); + } + + public CSSThemeVisualElement getDefaultHtmlTheme() { + String htmlName = Configuration.get(ConfigurationKeys.DEFAULT_HTML_THEME); + List list = findByProperty(CSSThemeVisualElement.class, "name", htmlName); + return (list!=null ? (CSSThemeVisualElement)list.get(0) : null); + } + + public SupportedLocale getDefaultLocale() { + String localeName = Configuration.get(ConfigurationKeys.SERVER_LANGUAGE); + return getSupportedLocale(localeName.substring(0,2),localeName.substring(3)); + } + + public void auditPasswordChanged(User user, String moduleName) { + String[] args = new String[1]; + args[0] = user.getLogin() + "(" + user.getUserId() + ")"; + String message = messageService.getMessage("audit.user.password.change", args); + getAuditService().log(moduleName, message); + } + + public void auditUserCreated(User user, String moduleName) { + String[] args = new String[2]; + args[0] = user.getLogin() + "(" + user.getUserId() + ")"; + args[1] = user.getFullName(); + String message = messageService.getMessage("audit.user.create", args); + getAuditService().log(moduleName, message); + } + } \ No newline at end of file Fisheye: Tag 1.2.10.1 refers to a dead (removed) revision in file `lams_common/src/java/org/lamsfoundation/lams/util/AuthEntityResolver.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java,v diff -u -r1.24 -r1.24.4.1 --- lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java 9 May 2007 01:07:22 -0000 1.24 +++ lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java 18 Sep 2007 07:20:50 -0000 1.24.4.1 @@ -134,4 +134,56 @@ public static String LAMS_COMMUNITY_ENABLE = "LAMS_Community_enable"; public static String ALLOW_EDIT_ON_FLY = "AllowLiveEdit"; + + public static String LDAP_PROVISIONING_ENABLED = "LDAPProvisioningEnabled"; + + public static String LDAP_PROVIDER_URL = "LDAPProviderURL"; + + public static String LDAP_SECURITY_AUTHENTICATION = "LDAPSecurityAuthentication"; + + public static String LDAP_PRINCIPAL_DN_PREFIX = "LDAPPrincipalDNPrefix"; + + public static String LDAP_PRINCIPAL_DN_SUFFIX = "LDAPPrincipalDNSuffix"; + + public static String LDAP_SECURITY_PROTOCOL = "LDAPSecurityProtocol"; + + public static String LDAP_TRUSTSTORE_PATH = "LDAPTruststorePath"; + + public static String LDAP_TRUSTSTORE_PASSWORD = "LDAPTruststorePassword"; + + public static String LDAP_LOGIN_ATTR = "LDAPLoginAttr"; + + public static String LDAP_FIRST_NAME_ATTR = "LDAPFNameAttr"; + + public static String LDAP_LAST_NAME_ATTR = "LDAPLNameAttr"; + + public static String LDAP_EMAIL_ATTR = "LDAPEmailAttr"; + + public static String LDAP_PHONE_ATTR = "LDAPPhoneAttr"; + + public static String LDAP_FAX_ATTR = "LDAPFaxAttr"; + + public static String LDAP_MOBILE_ATTR = "LDAPMobileAttr"; + + public static String LDAP_ORG_ATTR = "LDAPOrgAttr"; + + public static String LDAP_ROLES_ATTR = "LDAPRolesAttr"; + + public static String LDAP_LEARNER_MAP = "LDAPLearnerMap"; + + public static String LDAP_MONITOR_MAP = "LDAPMonitorMap"; + + public static String LDAP_AUTHOR_MAP = "LDAPAuthorMap"; + + public static String LDAP_GROUP_ADMIN_MAP = "LDAPGroupAdminMap"; + + public static String LDAP_GROUP_MANAGER_MAP = "LDAPGroupManagerMap"; + + public static String LDAP_UPDATE_ON_LOGIN = "LDAPUpdateOnLogin"; + + public static String LDAP_ORG_FIELD = "LDAPOrgField"; + + public static String LDAP_ONLY_ONE_ORG = "LDAPOnlyOneOrg"; + + public static String LDAP_ENCRYPT_PASSWORD_FROM_BROWSER = "LDAPEncryptPasswordFromBrowser"; } \ No newline at end of file Index: lams_common/src/java/org/lamsfoundation/lams/util/audit/AuditService.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/util/audit/AuditService.java,v diff -u -r1.3 -r1.3.10.1 --- lams_common/src/java/org/lamsfoundation/lams/util/audit/AuditService.java 17 Sep 2006 06:14:22 -0000 1.3 +++ lams_common/src/java/org/lamsfoundation/lams/util/audit/AuditService.java 18 Sep 2007 07:20:52 -0000 1.3.10.1 @@ -72,15 +72,23 @@ if ( ss != null ) { UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); if ( user != null ) { - return user.getLogin()+"("+user.getUserID()+"): "; + return getUserString(user); } } - return "User unknown (session does not contain user details): "; + return "System Generated (No Current User): "; } + + private String getUserString(UserDTO userDTO) { + return userDTO.getLogin()+"("+userDTO.getUserID()+"): "; + } public void log(String moduleName, String message) { logger.info(getUserString()+moduleName+": "+message); } + + public void log(UserDTO userDTO, String moduleName, String message) { + logger.info(getUserString(userDTO)+moduleName+": "+message); + } public void logChange(String moduleName, Long originalUserId, String originalUserLogin, String originalText, String newText) { Index: lams_common/src/java/org/lamsfoundation/lams/util/audit/IAuditService.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/util/audit/IAuditService.java,v diff -u -r1.3 -r1.3.10.1 --- lams_common/src/java/org/lamsfoundation/lams/util/audit/IAuditService.java 17 Sep 2006 06:14:22 -0000 1.3 +++ lams_common/src/java/org/lamsfoundation/lams/util/audit/IAuditService.java 18 Sep 2007 07:20:52 -0000 1.3.10.1 @@ -24,6 +24,8 @@ package org.lamsfoundation.lams.util.audit; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + /** Public interface for a service that writes audit records */ public interface IAuditService { @@ -33,6 +35,15 @@ * @param message message to be logged */ public void log(String moduleName, String message); + + /** + * Same as above, but logs message using given userDTO instead of current session DTO. + * Useful when importing users in a separate thread which isn't linked to main session. + * @param userDTO + * @param moduleName + * @param message + */ + public void log(UserDTO userDTO, String moduleName, String message); /** * Log a data change. The username, date, moduleName and change details are recorded in the audit log.

: :
:
:
*:
*:
*:
:
:
:
:
:
:
:
:
:
:
:
: Index: lams_central/web/login.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/login.jsp,v diff -u -r1.30 -r1.30.2.1 --- lams_central/web/login.jsp 24 May 2007 07:15:55 -0000 1.30 +++ lams_central/web/login.jsp 18 Sep 2007 07:20:58 -0000 1.30.2.1 @@ -19,11 +19,9 @@ // for sysadmin to be able to login as someone else String login = (String)session.getAttribute("login"); - String pass = (String)session.getAttribute("pass"); - if (login!=null && pass!=null) { + if (login!=null) { session.removeAttribute("login"); - session.removeAttribute("pass"); - response.sendRedirect("j_security_check?j_username="+login+"&j_password="+pass); + response.sendRedirect("j_security_check?j_username="+login+"&j_password=dummy"); } %> @@ -32,6 +30,7 @@ flash is searching for this string, so leave it!: j_security_login_page --> +<%= Configuration.getAsBoolean(ConfigurationKeys.LDAP_ENCRYPT_PASSWORD_FROM_BROWSER) %> <fmt:message key="title.login.window"/> @@ -49,8 +48,10 @@ @@ -45,13 +46,21 @@ href="index.do?state=active&tab=editprofile"> + + <%= AuthenticationMethod.DB %> +
  • +
  • + +