Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates for create user button #111

Open
govfvck opened this issue Mar 20, 2023 · 2 comments
Open

Templates for create user button #111

govfvck opened this issue Mar 20, 2023 · 2 comments
Labels
enhancement New feature or request frontend

Comments

@govfvck
Copy link
Contributor

govfvck commented Mar 20, 2023

Is your feature request related to a problem? Please describe.
It's very good to have some templates for user creation. for example, the admin could create a template with 30Gb of data usage, 1 month for the duration, and vless as the enabled proxy. anytime the admin clicks on this template, they would only enter the username and everything else would be filled automatically for that user.

Describe the solution you'd like
have a templates table to save these templates; users could add, remove, and edit these templates.
it would also need to be implemented in the front-end panel!

@govfvck govfvck added the enhancement New feature or request label Mar 20, 2023
@SaintShit
Copy link
Contributor

The front-end part might have lots of work. how about inbounds? can a template have a custom inbound (rather than protocol)?

@govfvck
Copy link
Contributor Author

govfvck commented Mar 21, 2023

can a template have a custom inbound (rather than protocol)?

sure it can, but the problem is when the inbounds are updated and something is changed. we have to think about that!

govfvck pushed a commit to govfvck/Marzban that referenced this issue Mar 26, 2023
app/db/models.py:
	add `UserTemplate` and `template_inbounds_association`

app/models/user_template.py:
	added schemas for `UserTemplate`

app/db/crud.py:
	add crud functions for `UserTemplate`

app/views/user_template.py:
	add `UserTemplate` endpoints

add migration for the added `UserTemplate` table
SaintShit added a commit that referenced this issue Mar 26, 2023
Back: Added User Templates (Back part of issue #111)
govfvck pushed a commit to govfvck/Marzban that referenced this issue Mar 26, 2023
…egram bot

update keyboars as needed.

add create user from template functionality for admin
SaintShit added a commit that referenced this issue Mar 26, 2023
Telegram: Implement (#111 create user from template) for telegram bot
@gozarman gozarman added this to the future features milestone Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
Status: No status
Development

No branches or pull requests

3 participants