Summary: [Patch] Improved command/access levels
                 Project: Freeciv
            Submitted by: mbook
            Submitted on: Monday 04/27/2009 at 16:32
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: mbook
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None



The attached patches for S2_1 and trunk port
the improved command/access levels from the
warclient codebase.

The main additions are two new access levels,
ALLOW_BASIC and ALLOW_ADMIN, which correspond
to permissions of players and remote server
administrators respectively.

ALLOW_BASIC rectifies the situation that there
exist some commands that clearly should not be
allowed to observers or detached connections,
but also should not be ALLOW_CTRL, so that
players may use them without initiating a vote.
For example /surrender, /away, /start, etc.

ALLOW_ADMIN is added to differentiate between
commands that would be fairly safe to allow a
trusted remote party to use, and commands that
would not be (for example reading or writing
arbitrary files on the local filesystem). It 
is not yet possible to automatically grant this
access level to users; later patches may
implement a scheme for defining and granting
specific access to authenticated users (e.g.
like warclient users action lists, or something

Also, a field is added to struct connection,
server.granted_access_level, that is used to
hold the user's initial access level received
upon connection. This is so that if the user
becomes an observer or a detached connection
and then attaches back to a player again, the
original granted access level will be restored.

Finally, a comment is fixed in common/
connection.h which referred to the old define
SSET_TO_SERVER, which has since been changed



File Attachments:

Date: Monday 04/27/2009 at 16:32  Name: S2_1-improved_access_levels.patch 
Size: 13kB   By: mbook
S2_1 r15623 --- trunk r15622
Date: Monday 04/27/2009 at 16:32  Name: trunk-improved_access_levels.patch 
Size: 13kB   By: mbook
S2_1 r15623 --- trunk r15622


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to