Comments (8)
Alright, now I understand your request. I will have a look at this in due time.
from synadm.
@JOJ0 I agree that it would be better to add the --token
option to the root command of synadm. Here, I think the advantage that we only have to implement the option once in the root command outweighs the potential disadvantages or any complications it may cause with the matrix login
command.
from synadm.
Hi Lykos, this functionality is already implemented for the matrix raw
command which can access the token via the environment variable MTOKEN
.
Line 102 in c827c9b
Maybe I missunderstood your request. Could you please clarify your use case and any errors that you may have encountered.
from synadm.
That's great! However, for every other command (eg. synadm user list
) I still need to have the access token of an admin account configured in the config file in plaintext:
MTOKEN=$(pass my-admin-token) synadm user list
ERROR Config entry missing: token
Running configurator...
[...]
from synadm.
Thhanks for the request @Lykos153, this is on my personal "would be nice to have" list for a long time already. As you both figured out already we have it implemented in matrix subcommand but not on regular admin api commands.
Please have a look at the precedence rules for token reading in the matrix raw command: https://synadm.readthedocs.io/en/latest/synadm.cli.matrix.html#synadm-matrix-raw
We should respect these rules and code this featur as similar as possible or even try to share code.
from synadm.
We should respect these rules and code this featur as similar as possible or even try to share code.
I agree with you. To be consistent, I would suggest to use the --token
option as implemented in matrix raw
command, so we can "copy-paste" this option to other commands. Let me know what you think about this approach and if you have any other ideas on how to implement this option.
from synadm.
Well it's not too easy I realize just now....
In that case I think it makes sense to have --token an option of synadm main command directly, and actually when we think about it, the synadm matrix subcommand should have that option directly as well. Changin that breaks existing behaviour but I think it would be worth it to streamline usability of both matrix and regular commands
from synadm.
Still there would be one caveat with my proposal: The existing matrix login command would not make sense with that --token option and would just ignore it. Is that bad? I could live with it and would definitely prefer having one --token option for all matrix commands
from synadm.
Related Issues (20)
- User modify API requires a redesign HOT 10
- User modify command doesn't show difference in non-interactive output mode
- synadm doesn't work after v0.38 with Click 7.0 HOT 8
- regtok delete is broken HOT 8
- Suppport the Room State API HOT 1
- Deactivating multiple users at once HOT 4
- Reduce postgresql database size? HOT 2
- Room Id not correct HOT 2
- Improve README: Add detailed prerequisites for matrix-docker-ansible-deploy users HOT 1
- Reintroduce the --servername option to the `media` commands HOT 1
- Unable to delete room HOT 7
- Unable to delete room (status code 500) HOT 4
- synadm stopped functioning on server HOT 4
- Integrate code-style checks into our CI HOT 3
- Catch non-existent rooms on room delete earlier
- Make it possible to change user type
- Investigate why we allow empty string as output format HOT 4
- Special internal room IDs breaks some commands HOT 3
- synadm 0.38 requires Click<8.0,>=7.0, but you have click 8.1.3 which is incompatible. HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synadm.