Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #657143

fcdb: allow database.lua to set user's cmdlevel, delegation etc

Added by Marko Lindqvist about 5 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Scripting API
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)

Description

Jacob Nevins <jtn>:

"An obvious extension for an authentication database would be to store access levels (cmdlevels) in it. I don't think this is possible with the current fcdb arrangements, however, as database.lua has no way to cause the cmdlevel to be changed.

The obvious thing is to give the script access to issue arbitrary server commands such as 'cmdlevel' (assuming we open up the security model per bug #19729). However, at the point where the script is naturally invoked (checking credentials), it's probably not practical to do this, so there'd probably need to be a further callback into Lua once the connection structure was set up and the server could accept further commands.

Delegation feels like something that could live in a database, too. However, this applies to players rather than users, so I'm less clear how that would work precisely. Possibly the script would need access to game structures (patch #3385?)"


Subtasks

Feature #778018: Add fcdb function to allow take and observeClosedMarko Lindqvist

Actions

Related issues

Related to Freeciv - Feature #657142: fcdb: provide Lua instance with access to game data, signals etcNew

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Freeciv - Feature #766520: Add fcdb hook for checking if player delegation is allowedClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocked by Freeciv - Feature #657141: Lua 'fcdb' instance should not share security restrictions with 'game' instanceClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Freeciv - Task #939772: S3_2 datafile format freeze (d3f)New

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Marko Lindqvist about 5 years ago

  • Blocks Task #656466: S3_0 datafile format freeze (d3f) added

#2 Updated by Marko Lindqvist about 5 years ago

  • Blocked by Feature #657141: Lua 'fcdb' instance should not share security restrictions with 'game' instance added

#3 Updated by Jacob Nevins almost 4 years ago

This was gna patch #3388 .

(assuming we open up the security model per bug #19729)

This became feature #657141, and was fixed.

Possibly the script would need access to game structures (patch #3385?)

This became feature #657142.

#4 Updated by Jacob Nevins almost 4 years ago

  • Related to Feature #657142: fcdb: provide Lua instance with access to game data, signals etc added

#5 Updated by Jacob Nevins almost 4 years ago

  • Related to Feature #766520: Add fcdb hook for checking if player delegation is allowed added

#6 Updated by Marko Lindqvist over 3 years ago

  • Blocks Task #673656: S3_1 datafile format freeze (d3f) added

#7 Updated by Marko Lindqvist over 3 years ago

  • Sprint/Milestone changed from 3.0.0 to 3.1.0

#8 Updated by Marko Lindqvist over 3 years ago

  • Blocks deleted (Task #656466: S3_0 datafile format freeze (d3f))

#9 Updated by Marko Lindqvist 5 months ago

Marko Lindqvist wrote:

However, at the point where the script is naturally invoked (checking credentials), it's probably not practical to do this, so there'd probably need to be a further callback into Lua

-> https://osdn.net/projects/freeciv/ticket/43464

#10 Updated by Marko Lindqvist 5 months ago

I'm working on this, but at the same time thinking that we could postpone this to 3.2, i.e., to commit to master only. There's no pressing need to have this in 3.1, and all of the patch series is not that trivial change (I'd rather test it in master for a bit longer time). This might help freeciv-web's fcdb usage development, but that is master only.

#11 Updated by Marko Lindqvist 4 months ago

  • Sprint/Milestone changed from 3.1.0 to 3.2.0

#12 Updated by Marko Lindqvist 4 months ago

  • Blocks Task #939772: S3_2 datafile format freeze (d3f) added

#13 Updated by Marko Lindqvist 4 months ago

  • Blocks deleted (Task #673656: S3_1 datafile format freeze (d3f))

#14 Updated by Marko Lindqvist 3 months ago

  • Category set to Scripting API

Delegation part split to -> https://osdn.net/projects/freeciv/ticket/43771

Reserving this ticket to cmdlevel part only.

#16 Updated by Marko Lindqvist 3 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF