scanner / as_email_service

A Django app and smtp relay service for working with 3rd party email services and asimap
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

convert `alias_for` and `aliases` in drf views to be a list of email addresses #51

Closed scanner closed 12 months ago

scanner commented 1 year ago

Right now we are using hyperlinks to link to alias_fors and aliases. This is all fine and dandy except:

  1. if you have as an alias or alias_for an email account that you are not the owner of you can not get its info from the rest api. For most users this will not be an issue but for a user that has a need to have other email accounts as aliases the interface becomes rather opaque (for example an email account that is the alias_for for things like "abuse@server" and such.
  2. all you can do is add and remove entries from this list so all you need to know is the email address of the account you are an alias for or being aliased to.

So update the views and serializers to give a list of email addresses (and take a list of email addresses.)

When adding an alias or alias_for via the REST interface you can only add email accounts that you own. However, you can remove any entry (whether or not you are the owner of the email account that that entity represents.)