I have just started playing around with 1.2.3RC11 I am wodering what I need to configure to avoid this message: REJECTED You do not have access to this portion of Koha ======================= What I have done: Vanilla koha install (using install.pl on linux), with all default values. I login using kohaadmin and kohapassword. Apache basic authentication is NOT configured for any koha directories. When I click on "Members" menu item it takes me to "members-home.pl" with message: "REJECTED You do not have access to this portion of Koha" Looking at cookies file, I note that my browser has set 2 cookies: 1 sessionID for each port - 8000 and 8001. In a previous message from Steve about authentication: 2. checkauth() checks for a $ENV{'REMOTE_USERNAME'} environment variable. a. If one is set, assume that basic authentication of some sort is being used b. check that this user is allowed to be running this script. If not, print a warning page and exit (possibly redirect to library home page or somesuch?). c. return a zero value and the userid logged in and the script carries on. ======================== Any ideas what I need to configure? R.
On Fri, 6 Sep 2002, Roger Buck wrote:
I have just started playing around with 1.2.3RC11
I am wodering what I need to configure to avoid this message:
REJECTED You do not have access to this portion of Koha
Is the "kohaadmin" user the user that you use for database access (the user that is set in /etc/koha.conf)? If so, that user is supposed to have access to everything and I'd call this a bug... if not... here's the trick: First, be aware that this cookie based authentication is _not finished_ and several parts of the intranet will be accessible without authentication as it stands. Second, each user in the borrowers table now has a 'flags' field that determines what they are allowed to access. The flags I have set up so far are: | 0 | superlibrarian | Access to all librarian functions | | 1 | circulate | Circulate books | | 2 | catalogue | Catalogue books | | 3 | parameters | Set Koha system paramters | | 4 | borrowers | Add or modify borrowers | | 5 | permissions | Set user permissions | | 6 | reserveforothers | Reserve books for patrons | | 7 | borrow | Borrow books | | 8 | reserveforself | Reserve books for self | I still need to create a script for editing the flags of any given user, but for now you can manually give yourself superlibrarian status by setting the '0' flag to the flags integer in the borrowers table: update borrowers set flags=0 where isnull(flags); update borrowers set flags=flags|power(2,0) where userid='kohaadmin'; to just grant "borrowers" access to the same user, set the '4' flag: update borrowers set flags=flags|power(2,4) where userid='kohaadmin'; Steve.
Tonnesen Steve wrote: [--snip--]
I am wodering what I need to configure to avoid this message:
REJECTED You do not have access to this portion of Koha
Is the "kohaadmin" user the user that you use for database access (the user that is set in /etc/koha.conf)?
Confirmed: Yes - Also I am now using clean install of 1.1.3RC12 with same result.
If so, that user is supposed to have access to everything and I'd call this a bug... if not... here's the trick: [--snip--] update borrowers set flags=0 where isnull(flags); update borrowers set flags=flags|power(2,0) where userid='kohaadmin'; [--snip--]
I have tried this and suggested changes to Circ2.pm but no luck. I think problem may be that the "kohaadmin" userid is not also installed in the db as a "borrower" by default? Also, just being incredibly picky and to avoid any potential confusion :), I think the default 1.2.3RC12 db name is 'Koha' in installer script but 'koha' in example koha.conf. R.
On Fri, 6 Sep 2002, Roger Buck wrote:
REJECTED You do not have access to this portion of Koha
I _do_ have a script that allows you to set the flags for a given borrower... however there was a bug in sub getpatroninformation that broke it. I've updated the Circ2.pm file in CVS to fix this problem. The flag editing can be reached by going to the member's details page and clicking on the "Modify User Flags" link right at the bottom. To fix the getpatroninformation subroutine you need to change line 145 of Circ2.pm ($intranetdir/modules/C4/Circulation/Circ2.pm) from: if ($flags & 2**$bit) { to: if ($borrower->{'flags'} & 2**$bit) { Steve.
participants (2)
-
Roger Buck -
Tonnesen Steve