URL:
  <http://gna.org/bugs/?21744>

                 Summary: Delegation is case-sensitive for username
                 Project: Freeciv
            Submitted by: davide_at_debian
            Submitted on: Mon 03 Mar 2014 12:51:22 AM UTC
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 2.4.2
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 

    _______________________________________________________

Details:

The current implementation of delegations is case-sensitive with regard to
usernames. That is, if user "A" delegates his nation to user "B", "b" wouldn't
be able to take the delegation from "A".

In Greatturn, games last for months and usernames can be somewhat long and
complicated; sometimes users log-in typing their nicks w/o paying attention to
case, and then they wonder why delegations stop working.

AFAIK, the whole structure of Freeciv is built to be case insensitive for
usernames, so this patch, which comes from Longturn, is somewhat inconsistent.
Moreover, Longturn solves this issue - for its sole benefit - by using the
following custom code to internally handle delegations in interactions with
DB:


SELECT delegation FROM auth_user AS u
    JOIN game_joined j ON (u.id = j.user_id)
    JOIN player_player p ON p.id = j.user_id
    WHERE lower(username) = lower('$USER') AND game_id = '$GAMENAME';


I think this patch should be made consistent with the rest of Freeciv, by
treating usernames case-insensitively.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?21744>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to