Commit graph

198 commits

Author SHA1 Message Date
Paul POULAIN
847bf18dad SearchMyLibraryFirst : reintroducing behaviour (from 2.2)
If the SearchMyLibraryFirst is set, then a logged user will automatically limit the search
to it's own library.

I also did some code cleaning

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-17 07:15:06 -05:00
Chris Cormack
e1e3c7839e Missing session->delete on users voluntary logout
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-06 18:12:24 -05:00
Chris Cormack
3185814348 Adding session storage to the other place sessions are made
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-06 17:03:37 -05:00
Chris Cormack
47db7248a2 Setting up a system preference to choose whether CGI::Session uses mysql, or
temporary files
Need to add it to a couple more places in C4::Auth

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-06 17:03:18 -05:00
Frédéric DEMIANS
ed1539eef5 Bug #1462 correction.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-06 01:38:02 -05:00
Paul POULAIN
dece480996 removing warn
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-03 14:58:23 -05:00
Paul POULAIN
6918fe7066 oups, sorry, missing #
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-02 15:45:48 -05:00
Paul POULAIN
bb12924c1b some cleaning in Auth
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-02 15:45:07 -05:00
Joshua Ferraro
f3e2ccfbf6 revive IntranetmainUserblock syspref, three-column design for mainpage
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-09-30 03:06:26 -05:00
Chris Cormack
f12fc20e1d Fix to get selectbranchandprinter working fine with the Session
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-09-06 20:48:13 -05:00
Joshua Ferraro
78d564b26e fixing help feature with new template structure
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-30 15:51:05 -05:00
Joshua Ferraro
ea16c580ab fixing inproper CGI header, again
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-30 15:50:56 -05:00
Joshua Ferraro
eb43cc8a32 adding support for js includes
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-08-29 12:22:37 -05:00
Joshua Ferraro
6ff1ecf14f adding levels for library, module, page and widgets per page
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-08-29 11:45:05 -05:00
Chris Cormack
16d7cb2ea3 Fixing a bug that occured if Koha wasnt installed, but a cookie was set in the browser
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-23 20:52:41 -05:00
Paul POULAIN
61c72f8f3e Adding KOHAVERSION management.
The kohaversion is in the code directory (in /kohaversion.pl)
C4::Context now has a new method C4::Context->KOHAVERSION
that returns the koha code version.
The systempreference Version contains the database version.

If the 2 are differents, when the user log in, he is redirected to web installer (new behaviour : before this commit, the check was done on everypage, it's too CPU costly I think)

In the web installer, we check now if we do a new setup or an upgrade and show only the appropriate link.

The updatedatabase contains a lot of new things :
* SetVersion($kohaversion), that set the kohaversion after each update
* TransformToNum($kohaversion) that returns a number (3.0000001 from 3.00.00.001 for example) for a given koha version
* DropAllForeignKeys($table) that does what is written : drop all foreign keys. A shame it's not possible directly in mySQL...
* for each database update, just :
add the following lines :
=item
    Describe what it does for other developpers
=cut

$DBversion = "your.koha.version.dbnumber";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
	#
	# DO YOUR UPDATE STUFF
	#
        print "Upgrade to $DBversion done (specify what it does if you want)\n";
        SetVersion ($DBversion);
}

IMPORTANT NOTES :
in koha 2.2, a new install was done through installing a 2.2.0 database, then updating it to the installed version.
in Koha 3.0, /installer/kohaversion.sql MUST contain an uptodate version, as the installer set the DB version to kohaversion after uploading kohaversion.sql. It does NOT run updatedatabase.

The update from Koha 2.2 to Koha 3.0 must NOT be done through the webinstaller : updatedatabase is very very long to run and you'll reach Apache timeout for sure. See http://wiki.koha.org/doku.php?id=22_to_30 that contains my notes for upgrading (with some/few UNIMARC specific stuff)


Note For RM, please eyeball this change

Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-16 06:58:32 -05:00
Chris Cormack
aafcb600c1 Merge branch 'master' of /home/jmf/repos/koha-rm-root.git/ 2007-08-10 12:15:13 -05:00
Joshua Ferraro
2b2f7a1794 revisions to login page to make it pretty
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-10 12:15:05 -05:00
Chris Cormack
8494eff8bc Removing warn in Auth.pm
Changing InstallAuth.pm to use CGI::Session

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-08-10 10:51:59 -05:00
Joshua Ferraro
663f3bb7d8 Revert "set the branch at login"
This reverts commit bf1fd83d08.

Conflicts:

	koha-tmpl/intranet-tmpl/prog/en/auth.tmpl

Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-09 10:46:47 -05:00
Joshua Ferraro
6cdf0832e2 new virtual shelves changes, keyed by biblionumber
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-09 09:17:49 -05:00
Joshua Ferraro
8ee881174f Merge branch 'master' of /usr/local/git/koha_base.git/ 2007-08-08 07:27:26 -05:00
Joshua Ferraro
bf1fd83d08 set the branch at login 2007-08-07 15:45:03 -05:00
Chris Cormack
dbdb7f4feb Merge branch 'master' of /home/jmf/repos/koha-rm-root.git/ 2007-08-07 15:43:42 -05:00
Joshua Ferraro
ab77322c08 adds the ability to set the branch at login,
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-07 15:41:19 -05:00
Joshua Ferraro
737fd3465a adding CGI::Session dependency for recent session re-write 2007-08-07 13:55:41 -05:00
Joshua Ferraro
a88a0d04ac taking out a warn
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-07 13:54:27 -05:00
Chris Cormack
512eda82cf Auth.pm rewritten to use CGI::Session
Signed-off-by: kados <jmf@liblime.com>
2007-08-07 13:22:11 -05:00
toins
a9b9f8002b using LoginBranchnameShort instead of LoginBranchname. 2007-07-17 09:28:52 +00:00
hdl
7275bc3d45 Adding KohaAdminEmailAdress
Adding LoginBranchCode
Adding a redirect to maintenance.pl for OPAC when installer required.
2007-07-11 10:24:24 +00:00
toins
335103bbd3 syspref are writed for the template in auth.pm 2007-07-10 14:21:41 +00:00
kados
f6126d9962 replacing SUPER with NO_LIBRARY_SET for login information 2007-07-03 18:29:37 +00:00
tipaul
8767b123c4 improving installer : now the database Version is compared to the Koha version (defined by <kohaversion>XXX</kohaversion> in koha.xml file. If the Version systempref does not exist or is lower than kohaversion, you're redirected to installer. If there is no Version, you're redirected to the 1st step of the installer (full install). If Version < kohaversion, you're redirected to step 3 (updatedatabase). check that you have <kohaversion> in you koha.xml, otherwise, you'l loop forever to the installer... 2007-07-03 13:50:20 +00:00
kados
daa450ebbd adding a warn to log why we're redirecting to installer 2007-07-03 04:39:03 +00:00
tipaul
8581fe4bbd updating web installer : going to step1 if needed and fixing sql 2007-06-26 14:30:22 +00:00
tipaul
5dd3f0229a bugfixes (various), handling utf-8 without guessencoding (as suggested by joshua, fixing some zebra config files -for french but should be interesting for other languages- 2007-06-06 13:08:35 +00:00
tipaul
6f276facc8 removing guessencoding, hard-coding utf-8 2007-06-05 08:53:19 +00:00
hdl
100e6a9808 functions that were in C4::Interface::CGI::Output are now in C4::Output.
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
2007-04-24 13:54:28 +00:00
hdl
66232241c1 Adding Check for a systempreference Version Variable
skips third party software check and mysql check to go to updatedatabase.

Adding similar check to intranet and opac.

BEWARE !!!!!
You may be linked to install if you donot have Version variable set in your systempreferences table.
If so, simply updatedatabase OR add Version 3.0  record to your systempreferences table.
2007-04-06 15:53:18 +00:00
tipaul
c596d55374 HUGE COMMIT : code cleaning circulation.
some stuff to do, i'll write a mail on koha-devel NOW !
2007-04-04 16:46:22 +00:00
tipaul
2ffd5b7228 rel_3_0 moved to HEAD 2007-03-09 14:28:54 +00:00
tgarip1957
ab45e7aaab Bug fixing and complete removal of Date::Manip 2006-11-06 21:01:43 +00:00
tgarip1957
9be398961d Some bug fixing, new acquisitions handling 2006-09-20 21:48:44 +00:00
tgarip1957
57d5b19dca Fixes bug with MARChtml2xml in Biblio.pm
synching with dev_week
2006-09-11 17:09:59 +00:00
toins
3c6410111b subs renamed according to coding guidelines. 2006-07-21 10:10:29 +00:00
toins
cc9524a875 Head & rel_2_2 merged 2006-07-04 14:36:51 +00:00
alaurin
02632b6bc3 bug fixing :
- for the userenv cookie, the branch, is now correctly implemented with the ip check .....
2006-06-09 12:06:15 +00:00
rangi
536d95d089 Merging dev_week, and fixing formatting 2006-05-21 05:59:47 +00:00
alaurin
527c449099 committing new feature ip and printer management
adding two fields in branches table (branchip,branchprinter)

branchip : if the library enter an ip or ip range any librarian that connect from computer in this ip range will be temporarly affected to the corresponding branch .

branchprinter : the library  can select a default printer for a branch
2006-05-19 09:52:54 +00:00
tipaul
e9a9ffb36e adding the branchname and the librarian name in every page :
- modified userenv to add branchname
- modifier menus.inc to have the librarian name & userenv displayed on every page. they are in a librarian_information div.
2006-05-09 13:28:08 +00:00
tipaul
b38997925f big commit, still breaking things...
* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued
2005-10-26 09:11:02 +00:00
tipaul
2605a20610 adding emailaddress to user context.
Now, we can use userenv->{emailaddress} to get the librarian email address everywhere.
2005-08-05 14:43:44 +00:00
tipaul
e218294c2c fixing a bug in synch 2005-08-04 14:35:54 +00:00
tipaul
2cd0bc1da8 synch'ing 2.2 and head 2005-08-04 13:27:37 +00:00
hdl
0960f3245c Removing some unuseful warns.
Adding an error management for memberentry : Branch.
2005-07-29 16:14:37 +00:00
hdl
5d22c28ea2 Implementing Independancy Branches management :
- Trying to get a basket not owned by so of his own branch leads to mainpage.
- Lists onlys ths baskets owned by someon of user's brach.

Auth.pm now sends a cookie with userenv informations.
2005-07-28 07:52:02 +00:00
hdl
31fca3dfd2 Bug Fixing for independantBranches support.
Addign a Cookie containing user specific vars such as :
branch,
firstname,
surname,
cardnumber...
may be criticized from a lawyer point of view, since name and surname are given.
But the real need is for userid and branch.
And it is achieved.
Auth passes now TWO cookies :
a session cookie
And an environment cookie.
2005-07-26 15:58:47 +00:00
tipaul
b8e4963f90 some bugfixes, but still don't work correctly 2005-07-26 10:12:48 +00:00
hdl
5fa6925444 Adding Branch Independancy.
Still under development.
2005-07-26 07:50:27 +00:00
tipaul
6b0ee5525b synch'ing 2.2 and head 2005-06-20 14:10:00 +00:00
tipaul
369527637b synch'ing 2.2 and head 2005-05-04 15:39:07 +00:00
doxulting
b9a8342843 New param for the template in order to show only allowed links to user (In parameters screen only right now) 2005-03-23 09:25:20 +00:00
tipaul
5a612e176c remove LDAP dependancy, replaced by auth_with_ldap.pm 2004-11-05 10:12:27 +00:00
tipaul
a115863f93 some fixes for LDAP (more to come) 2004-09-02 16:25:20 +00:00
rangi
64a6d5d756 Contains the function to get the language template, and set the cookie 2004-07-16 21:15:26 +00:00
tipaul
a21293a475 adding LibraryName variable in the template 2004-05-10 09:23:32 +00:00
tipaul
097e2d5718 bugfix : a missing } was placed at a wrong place. The auth did not work anymore... 2004-03-19 15:07:29 +00:00
joshferraro
7684b9caf5 fixed missing } at EOF 2004-03-16 20:29:04 +00:00
tipaul
7d08d249a0 adding LDAP auth.
Introduce a new Perl dependency Net:LDAP
2004-03-04 16:49:09 +00:00
tipaul
b42279581b adding demo mode 2003-08-06 12:38:27 +00:00
tonnesen
3ba349bd4e Increased default inactivity timeout from 2 minutes to 5 minutes. 2003-06-11 18:40:53 +00:00
tipaul
368d9107a2 moving loggedinuser => loggedinusername in includes and Auth.pm :
The $loggedinuser in Koha is the CODE of the logged user (result of get_user_and_template subroutine).
BTW, in get_user_and_template subroutine, the TMPL_VAR loggedinuser is replaced by the NAME of the user.
This is troubleshooting.
so, I replace the name by the "loggedinusername" template variable.
If you want to add the username somewhere, just add <TMPL_VAR name="loggedinusername"> in the template.

Fixes bug #401
2003-05-05 15:00:53 +00:00
tipaul
5a54bfc1ae *** empty log message *** 2003-05-02 13:05:08 +00:00
tipaul
3205a1a3ff reindenting & code cleaning 2003-03-19 21:03:32 +00:00
acli
850a3e41f6 Use the new C4::Boolean module and the new C4::Auth::boolean_parameter
function to test for boolean values in parameters
2003-02-06 06:35:26 +00:00
acli
8f722b5829 POD elaboration for checkauth() (esp. regarding "$flagsrequired") 2003-02-06 06:13:59 +00:00
tonnesen
f58bb6afe0 Removing +1y expiry time from cookies so that cookies expire when the browser
exits.
2003-02-04 17:57:10 +00:00
acli
8f62498205 Updated module location 2003-02-03 07:23:14 +00:00
acli
5d52c8bf49 Removed scoping-related perl warnings
Factored similar code in getborrowernumber
"i.e." in one comment should be "e.g."
2003-01-20 07:38:23 +00:00
acli
ea50c2acb6 Preliminary fix of the CGI.pm problem of always assuming that everything is
in ISO-8859-1.

A new C4::Charset module (tentative name) has been created to guess the
charset of a piece of HTML markup. The CGI programs will be modified to use
this module as they are encountered during translation.
2003-01-19 06:15:44 +00:00
tipaul
b0d0dddfac authentification bugfix :
the api in pod-auth.pm has "type => 'opac' "parameter.
If called from intranet, should be type => 'intranet'.
Output.pm checked for type existed, and not it's value. Now, Output compares checks for type value.
If type='intranet', then the intranet template is called, else it's an opac template.
Finlay, please validate this commit.
2002-12-10 15:52:49 +00:00
finlayt
2ee268c632 This is essentially the Auth.pm coming from the rel-1-2 branch. It is quite different from the old one, but shouldnt break any existing code. 2002-12-04 04:32:35 +00:00
arensb
5ff7515d5b Turn off authentication entirely if systempreference "insecure" is set
to "yes".
2002-10-12 06:12:39 +00:00
tipaul
ae8bd1dbf8 cleaning code 2002-10-10 14:47:00 +00:00
tipaul
9d31145bf2 merging 1.2 and bugfixes for auth and login 2002-10-10 10:07:34 +00:00
arensb
fa873de1fd Added whitespace to make the POD work.
Simplified references.
2002-10-10 04:29:39 +00:00
arensb
acaffcf53e Added POD and some comments. 2002-10-07 00:34:24 +00:00
arensb
dbca39823f Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.
2002-10-05 09:44:27 +00:00
tonnesen
1e67687742 Added copyright statement to all .pl and .pm files 2002-08-14 18:12:50 +00:00
tonnesen
17388eccad Updates to authentications cripts. userpage.pl is the page for authenticated
users in the OPAC to set preferences, get personal information, etc.
2002-07-11 05:46:58 +00:00
tonnesen
657685e1ac Auth.pm now caches form submissions and resubmits them if a user logs back in
after being logged out for inactivity.  Also switched from crypt passwords to
md5 passwords stored in borrowers table.  Used Digest::MD5 module.  I ain't
gonna reinvent _that_ wheel.  :)
2002-07-09 05:37:53 +00:00
tonnesen
1a43c68fe3 Cookie bug. 2002-07-05 20:33:23 +00:00
tonnesen
259a4873fb Auth.pm now checks the password againts a new field in the borrowers table
(password).   There is also a new "userid" field in the borrowers table.  When
a user logs in, the userid will be checked against the userid first and the
cardnumber second, so either method will work.
2002-07-05 19:56:35 +00:00
tonnesen
a66bcaa168 Minor changes to authentication routines. 2002-07-05 05:03:36 +00:00
tonnesen
bdee484019 Checks for a basic authentication userid. If found, it skips the cookie stuff.
Also now supports scripts that do not _require_ authentication, but might
display differently if they get an authenticated userid (might be useful for
opac pages, where pages could be tailored to meet a patron's preferences).
2002-07-04 21:22:21 +00:00
tonnesen
185adfbfe7 Additions to authentication scheme. Logs to /tmp/sessionlog. Will move this
to a db table.
2002-07-04 21:09:43 +00:00
tonnesen
62e0baa92a Minor changes 2002-07-04 19:42:48 +00:00
tonnesen
60a72c67fe Beginning of authentication api. Applied to shelves.pl for now as a test case. 2002-07-04 19:21:29 +00:00