Commit Graph

8 Commits

Author SHA1 Message Date
Luna 915b6224e9 permissions: fix overwrite fetching in compute_overwrites
- pubsub.guild: only send a chan action to channels user can read
2018-12-02 18:09:00 -03:00
Luna Mendes 46759a4e7c pylint pass
fixing unused imports across all code
2018-11-13 01:40:31 -03:00
Luna Mendes 55f8919689 pubsub.lazy_guilds: add support for 'everyone'-type GMLs
if the everyone role can read the channel, then the member list
will be equivalent to any other list where the everyone role
can read the channel. with this in mind we can generate a "global"
member list directed only for that usecase.

 - permissions: add role_permissions
2018-11-07 04:11:17 -03:00
Luna Mendes 04d89a2214 pubsub.lazy_guilds: major refactor
This makes the whole process of generating a member list
easier to understand and modify (from my point of view).

The actual event dispatching functionality is not on this
commit.

 - permissions: add optional storage kwarg
2018-11-05 22:04:48 -03:00
Luna Mendes da8b049174 channel.messages: add permission checks
this commit only adds permission checking to most parts of the
message endpoints.

 - channel.messages: fix extract_limit's default param
 - channel.messages: check send_messages, mention_everyone, send_tts_messages
 - channel.messages: check manage_messages
 - blueprints.checks: add guild_perm_check, channel_perm_check
 - errors: add error_code property, change some inheritance
 - permissions: fix base_permissions
 - storage: fix get_reactions
 - storage: remove print-debug
 - run: use error_code property when given
2018-11-04 19:55:21 -03:00
Luna Mendes 87dd70b4d9 permissions: add basic permission api
- litecord.auth: insert request.user_id
 - storage: add get_member_role_ids
2018-11-04 17:54:48 -03:00
Luna Mendes 86705b0645 blueprints.guilds: add 2 role endpoints
Add PATCH /api/v6/guilds/:id/roles for multiple position changes for
roles and PATCH /api/v6/guilds/:id/roles/:id for single guild
role changes

 - permissions: add int maigc method
 - schemas: add ROLE_UPDATE and ROLE_UPDATE_POSITION
2018-10-26 21:05:45 -03:00
Luna Mendes aaa11be258 blueprints.guilds: add auto-role and auto-channel creation
also simplify a lot of repeated code on the blueprint.

 - litecord: add permissions module
    for future role code

 - schemas: add channel_type, guild_name, channel_name types
 - schemas: add GUILD_CREATE schema
2018-10-26 02:34:17 -03:00