Skip to content

Commit

Permalink
Fix v4.0.1: Actualized documentation (#50)
Browse files Browse the repository at this point in the history
## v4.0.1 - 2024-10-22
### What's Changed
**Full Changelog**: v4.0.0...v4.0.1 by @obervinov in #47
#### 📚 Documentation
* actualized documentation in the `README.md` file
  • Loading branch information
obervinov authored Oct 22, 2024
1 parent e82fd32 commit 028833a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).


## v4.0.1 - 2024-10-22
### What's Changed
**Full Changelog**: https://github.com/obervinov/users-package/compare/v4.0.0...v4.0.1 by @obervinov in https://github.com/obervinov/users-package/pull/47
#### 📚 Documentation
* actualized documentation in the `README.md` file

## v4.0.0 - 2024-10-22
### What's Changed
**Full Changelog**: https://github.com/obervinov/users-package/compare/v3.0.2...v4.0.0 by @obervinov in https://github.com/obervinov/users-package/pull/46
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ The `Users` class provides authentication, authorization, user attribute managem

- Initialize with `VaultClient` and without `rate_limits`:
```python
users_without_ratelimits = Users(vault=vault_client, rate_limits=False, storage={'db_role': 'my_role'})
users_without_ratelimits = Users(vault=vault_client, rate_limits=False, storage_connection=psycopg2.connect(**db_config))
```

- Initialize with `VaultClient` and with `rate_limits`:
```python
users_with_ratelimits = Users(vault=vault_client, storage={'db_role': 'my_role'})
users_with_ratelimits = Users(vault=vault_client, storage_connection=psycopg2.connect(**db_config))
```

- Initialize with Vault `configuration dictionary`:
Expand All @@ -95,7 +95,7 @@ The `Users` class provides authentication, authorization, user attribute managem
'secret_id': 'my_secret_id'
}
}
users_with_dict_vault = Users(vault=vault_config, storage={'db_role': 'my_role'})
users_with_dict_vault = Users(vault=vault_config, storage_connection=psycopg2.connect(**db_config))
```

### method: User Access Check
Expand Down Expand Up @@ -276,7 +276,7 @@ vault_client = VaultClient(
)

# create the Users instance of the class with rate limits and get user information
users = Users(vault=vault_client, rate_limits=True, storage={'db_role': 'my_vault_db_role'})
users = Users(vault=vault_client, rate_limits=True, storage_connection=psycopg2.connect(**db_config))
user_info = users.user_access_check(user_id=message.chat.id, role_id="admin_role", chat_id=message.chat.id, message_id=message.message_id)

# check permissions, roles, and rate limits
Expand Down Expand Up @@ -311,7 +311,7 @@ vault_client = VaultClient(
)

# create the Users instance of the class without rate limits and get user information
users = Users(vault=vault_client, storage={'db_role': 'my_vault_db_role'})
users = Users(vault=vault_client, storage_connection=psycopg2.connect(**db_config))
user_info = users.user_access_check(user_id=message.chat.id, role_id="admin_role", chat_id=message.chat.id, message_id=message.message_id)

# check permissions and roles
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "users"
version = "4.0.0"
version = "4.0.1"
description = "This python module is a simple implementation of user management functionality for telegram bots, such as: authentication, authorization and requests limiting."
authors = ["Bervinov Oleg <[email protected]>"]
maintainers = ["Bervinov Oleg <[email protected]>"]
Expand Down

0 comments on commit 028833a

Please sign in to comment.