[Freeciv-Dev] [patch #3743] /delegate tidy-up

2014-03-02 Thread Davide Baldini
Follow-up Comment #9, patch #3743 (project freeciv):

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/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2014-03-02 Thread Jacob Nevins
Follow-up Comment #10, patch #3743 (project freeciv):

Sounds reasonable without looking in detail; please raise a new ticket for it
(this one has been closed for a year, so we'll just lose the comment
otherwise).

___

Reply to this item at:

  http://gna.org/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2014-03-02 Thread Davide Baldini
Follow-up Comment #11, patch #3743 (project freeciv):

For reference, the new ticket is here:
https://gna.org/bugs/index.php?21744

___

Reply to this item at:

  http://gna.org/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2013-03-01 Thread Jacob Nevins
Update of patch #3743 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2013-02-27 Thread Jacob Nevins
Update of patch #3743 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 

___

Follow-up Comment #5:

No-one screamed, so in it goes.

___

Reply to this item at:

  http://gna.org/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2013-02-27 Thread Jacob Nevins
Update of patch #3743 (project freeciv):

  Status:Done = In Progress
 Open/Closed:  Closed = Open   

___

Follow-up Comment #6:

...now of course is the time I notice I left some debugging crap in there,
fortunately #if 0'd out.

___

Reply to this item at:

  http://gna.org/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2013-02-27 Thread Jacob Nevins
Additional Item Attachment, patch #3743 (project freeciv):

File name: trunk-S2_4-delegate-rework-rm-debug.patch Size:0 KB


___

Reply to this item at:

  http://gna.org/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2013-02-27 Thread Jacob Nevins
Update of patch #3743 (project freeciv):

  Status: In Progress = Ready For Test 


___

Reply to this item at:

  http://gna.org/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2013-02-24 Thread Jacob Nevins
Update of patch #3743 (project freeciv):

  Status: In Progress = Ready For Test 

___

Follow-up Comment #1:

Attached a patch. As well as the previous, some more specific issues I know it
to fix:
* a delegate going from observing player X to controlling the same player was
not handled (it was spuriously refused)
** (In general, observers will not by default be able to be delegates, as they
have 'info' level but /delegate is ALLOW_BASIC. But delegates who are
observers seems a reasonable use case to me. Given that it implements its own
access control 
* '/delegate cancel player' by an admin while the delegation was active was
not handled and would crash
** It's now handled by forcibly detaching the delegate. This means that an
admin should be able to untangle any set of delegations users have set up,
which is good IMO as some commands are prevented even for admins with
delegations active.
** (I considered also allowing admins to do third-party '/delegate restore
user' and allowing '/delegate to' to disconnect the current delegate too,
but decided I'd spent long enough polishing this already.)
* several strings weren't marked for i18n

That's not all the changes though; in general, the checks have been tightened
up and should be self-consistent.

It would be good if someone who's used delegate functionality before could
review/test this; I've reverse-engineered how it's supposed to work, and what
I've ended up with seems useful to me, but it's possible that I've missed the
point or some important way in which it is used in practice.

(file #17331)
___

Additional Item Attachment:

File name: trunk-S2_4-delegate-rework.patch Size:42 KB


___

Reply to this item at:

  http://gna.org/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2013-02-24 Thread Jacob Nevins
Follow-up Comment #2, patch #3743 (project freeciv):

 Given that it implements its own access control
...perhaps /delegate should be ALLOW_INFO? I haven't done this.

___

Reply to this item at:

  http://gna.org/patch/?3743

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


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


[Freeciv-Dev] [patch #3743] /delegate tidy-up

2013-02-23 Thread Jacob Nevins
URL:
  http://gna.org/patch/?3743

 Summary: /delegate tidy-up
 Project: Freeciv
Submitted by: jtn
Submitted on: Sat Feb 23 23:05:52 2013
Category: general
Priority: 5 - Normal
  Status: In Progress
 Privacy: Public
 Assigned to: jtn
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.4.0,2.5.0

___

Details:

It started as the usual batch of string changes and kind of ballooned. So far
I have:
* much expanded help for /delegate
* add /list delegations to help
* remove redundant check (per bug #20525)
* more comprehensive delegation messages when user connects
** fix bug where info about connections delegated to you not displayed if you
were unattached or global observer
* fix inaccurate messages if delegate user not connected to anything (not even
global observer) (this case seems neglected, per bug #20490)




___

Reply to this item at:

  http://gna.org/patch/?3743

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


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