gfrenoy / TabT-API

Programming interface for TabT, the free table tennis manager software
http://tabt.frenoy.net
GNU Affero General Public License v3.0
9 stars 5 forks source link

Logged in players can retrieve there ranking information #13

Closed Fllorent0D closed 5 years ago

gfrenoy commented 5 years ago

Thanks Florent. But that will not work :-/

"pid" is the internal player identifier and "UniqueIndex" is the external member license number.

Moreover, we need to make this optionally configurable by the API admin because this option does not match what is currently possible on the website.

I mean: on the website, you have to have the admin or classement right to see this information.

Fllorent0D commented 5 years ago

Ah ok. Didn't check what was the pid, I thought the player id was based on the player's unique index.

That info would be great to have from my side. A lot of users want their "provisional" ranking directly in the application but they don't have enough permissions.

gfrenoy commented 5 years ago

Sure, the need is obvious but it won't work as proposed...

Two changes are required:

Thanks for your help.

Fllorent0D commented 5 years ago

Updated the PR. What do you think about it ? 😊

gfrenoy commented 5 years ago

Looks great! Thanks a lot. Will integrate this soon and let you know.

Fllorent0D commented 5 years ago

Any idea when it will be integrated ? 😊

gfrenoy commented 5 years ago

The good question is "What can I do to help speeding up thing?".

And the answer would be : can you have a look at the portion under if ($OnBehalfOf > 0), there we may also need to add something (not sure what though, need to look into the details but currently no time to do so...).

Fllorent0D commented 5 years ago

Thanks ! Nice work !

Fllorent0D commented 5 years ago

Is it deployed on both vttl and afft instance? or is the config set to allow the retrieving of the rankings?

gfrenoy commented 5 years ago

Yes it is but the flag (allow_own_ranking_info) was not set. Just did it now for AFTT.

Fllorent0D commented 5 years ago

Tried this morning and I didn't see any changes on my profile. Something might be wrong somewhere

Fllorent0D commented 5 years ago

Nevermind it's working

gfrenoy commented 5 years ago

My bad, one file was not correctly merged.

Note that I made some more tests and strengthened a bit the required permissions to better match reality (VTTL players shall not have access to this information if they are using the AF API).

There was also a security glitch with the OnBehalfOf that is now fixed.