-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Make possible for apps to define their own avatar types #24579
Make possible for apps to define their own avatar types #24579
Commits on Dec 7, 2020
-
Make possible to send requests as anonymous users in integration tests
Until now requests always had "auth" headers either for an admin or a regular user, depending on the value of "currentUser". Now, if "currentUser" starts by "anonymous" no "auth" header is sent, which makes possible to also test requests with users not logged in. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b553b43 - Browse repository at this point
Copy the full SHA b553b43View commit details -
Make possible to set body in requesttoken requests in integration tests
"sendingAToWithRequesttoken" needs to be used to test some non OCS endpoints which require the request token to be sent in the request. Now it is possible to specify the body (or, rather, additional contents beside the cookies and the request token) for those requests, as it will be needed for example to upload an avatar. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 184742e - Browse repository at this point
Copy the full SHA 184742eView commit details -
Add integration tests for user avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2cc22a0 - Browse repository at this point
Copy the full SHA 2cc22a0View commit details -
Add integration tests for resized user avatars
Even on solid color images the resizing can cause some small artifacts that slightly modify the color of certain pixels. Due to this now the color comparison is no longer strict but fuzzy. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1552add - Browse repository at this point
Copy the full SHA 1552addView commit details -
Add integration tests for getting guest avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b4b3276 - Browse repository at this point
Copy the full SHA b4b3276View commit details -
Add getter for generic avatars to IAvatarManager
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1de8dc3 - Browse repository at this point
Copy the full SHA 1de8dc3View commit details -
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for bcce5a6 - Browse repository at this point
Copy the full SHA bcce5a6View commit details -
Make possible to set body in OCS requests in integration tests
"sendingToWith" is used to test OCS endpoints. Now it is possible to specify the body (or, rather, additional contents beside the cookies and the request token) for those requests, as it will be needed for example to upload an avatar. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2522439 - Browse repository at this point
Copy the full SHA 2522439View commit details -
Add integration tests for getting and setting generic avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b190431 - Browse repository at this point
Copy the full SHA b190431View commit details
Commits on Dec 10, 2020
-
fixup! Add OCS endpoint for avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 63cbd7b - Browse repository at this point
Copy the full SHA 63cbd7bView commit details -
fixup! Add OCS endpoint for avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a31a7fd - Browse repository at this point
Copy the full SHA a31a7fdView commit details -
Make possible to define custom avatar types
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 92c9fc0 - Browse repository at this point
Copy the full SHA 92c9fc0View commit details -
fixup! Add OCS endpoint for avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a836608 - Browse repository at this point
Copy the full SHA a836608View commit details -
Move registration of IAvatarProviders to IRegistrationContext
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 95e0177 - Browse repository at this point
Copy the full SHA 95e0177View commit details
Commits on Dec 14, 2020
-
fixup! Make possible to define custom avatar types
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f04a16a - Browse repository at this point
Copy the full SHA f04a16aView commit details -
fixup! Add OCS endpoint for avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ebf242a - Browse repository at this point
Copy the full SHA ebf242aView commit details -
fixup! Add getter for generic avatars to IAvatarManager
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for bf9169e - Browse repository at this point
Copy the full SHA bf9169eView commit details -
fixup! Make possible to define custom avatar types
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1e13309 - Browse repository at this point
Copy the full SHA 1e13309View commit details -
fixup! Add OCS endpoint for avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6e43ce7 - Browse repository at this point
Copy the full SHA 6e43ce7View commit details -
fixup! Make possible to define custom avatar types
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 90ac35d - Browse repository at this point
Copy the full SHA 90ac35dView commit details -
fixup! Move registration of IAvatarProviders to IRegistrationContext
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5d0102e - Browse repository at this point
Copy the full SHA 5d0102eView commit details -
fixup! Move registration of IAvatarProviders to IRegistrationContext
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ab910ec - Browse repository at this point
Copy the full SHA ab910ecView commit details -
fixup! Make possible to define custom avatar types
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a2c63ff - Browse repository at this point
Copy the full SHA a2c63ffView commit details -
Move deprecated ILogger to LoggerInterface in avatar private classes
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 76e4bd2 - Browse repository at this point
Copy the full SHA 76e4bd2View commit details -
Add explicit providers for user and guest avatars
User and guest avatars were treated as built-in types and handled directly by the AvatarManager. Now a provider is introduced for each type, so they are handled like any generic avatar type. The AvatarManagerTest only tested getting user avatars, so the unit test was renamed and adjusted to test the UserAvatarProvider instead. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 612dbe6 - Browse repository at this point
Copy the full SHA 612dbe6View commit details -
Remove no longer needed attributes from AvatarManager
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0e953eb - Browse repository at this point
Copy the full SHA 0e953ebView commit details -
Get the avatar provider rather than the avatar itself from the manager
This will make possible to use other future IAvatarProvider methods. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0bb311f - Browse repository at this point
Copy the full SHA 0bb311fView commit details -
Add method to get the cache duration of an avatar to IAvatarProvider
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 611881b - Browse repository at this point
Copy the full SHA 611881bView commit details -
fixup! Add method to get the cache duration of an avatar to IAvatarPr…
…ovider Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6c99a9a - Browse repository at this point
Copy the full SHA 6c99a9aView commit details
Commits on Dec 15, 2020
-
fixup! Add explicit providers for user and guest avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6079793 - Browse repository at this point
Copy the full SHA 6079793View commit details -
fixup! Move registration of IAvatarProviders to IRegistrationContext
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for bcd2074 - Browse repository at this point
Copy the full SHA bcd2074View commit details -
fixup! Get the avatar provider rather than the avatar itself from the…
… manager Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 23f4c1d - Browse repository at this point
Copy the full SHA 23f4c1dView commit details -
fixup! Make possible to define custom avatar types
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e88d3b6 - Browse repository at this point
Copy the full SHA e88d3b6View commit details -
fixup! Add explicit providers for user and guest avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4a26943 - Browse repository at this point
Copy the full SHA 4a26943View commit details -
fixup! Add explicit providers for user and guest avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for fa0342a - Browse repository at this point
Copy the full SHA fa0342aView commit details -
fixup! Get the avatar provider rather than the avatar itself from the…
… manager Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ebc3f14 - Browse repository at this point
Copy the full SHA ebc3f14View commit details -
fixup! Add integration tests for getting and setting generic avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 03eed3e - Browse repository at this point
Copy the full SHA 03eed3eView commit details -
fixup! Add integration tests for getting and setting generic avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1348cab - Browse repository at this point
Copy the full SHA 1348cabView commit details -
fixup! Add OCS endpoint for avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8d69a4e - Browse repository at this point
Copy the full SHA 8d69a4eView commit details -
fixup! Make possible to define custom avatar types
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4368ec0 - Browse repository at this point
Copy the full SHA 4368ec0View commit details -
fixup! Add integration tests for getting and setting generic avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6b8f290 - Browse repository at this point
Copy the full SHA 6b8f290View commit details
Commits on Dec 16, 2020
-
fixup! Add method to get the cache duration of an avatar to IAvatarPr…
…ovider Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 68b298e - Browse repository at this point
Copy the full SHA 68b298eView commit details -
Split try/catch blocks to catch only the relevant exceptions
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for cc7cd18 - Browse repository at this point
Copy the full SHA cc7cd18View commit details -
Add method to check if an avatar can be accessed by the current user
IAvatarProvider implementers now need to define whether the current user can access or not a given IAvatar (created by the provider itself). With this the GenericAvatarController can allow or deny access to avatars in a generic way. The controller returns STATUS_NOT_FOUND instead of STATUS_FORBIDDEN to prevent revealing to unauthorized users the existence of an element with the given id. Adding the method to IAvatarProvider prevents touching IAvatar, which might require changes in apps, and also keeps the access control logic separate from the avatar logic, which is more focused on handling of files and images. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6ed5fde - Browse repository at this point
Copy the full SHA 6ed5fdeView commit details -
Add method to check if an avatar can be modified by the current user
IAvatarProvider implementers now need to define whether the current user can modify or not a given IAvatar (created by the provider itself). With this the GenericAvatarController can allow or deny modification (including deletion) of avatars in a generic way. The controller returns STATUS_NOT_FOUND instead of STATUS_FORBIDDEN to prevent revealing to unauthorized users the existence of an element with the given id. Adding the method to IAvatarProvider prevents touching IAvatar, which might require changes in apps, and also keeps the access control logic separate from the avatar logic, which is more focused on handling of files and images. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 65c8c22 - Browse repository at this point
Copy the full SHA 65c8c22View commit details -
Add integration tests for unauthorized modification of avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 135d14b - Browse repository at this point
Copy the full SHA 135d14bView commit details -
Add method to get the version of an avatar
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 330fac8 - Browse repository at this point
Copy the full SHA 330fac8View commit details -
Limit the returned sizes of the avatars to a predefined set
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 68fa045 - Browse repository at this point
Copy the full SHA 68fa045View commit details -
fixup! Get the avatar provider rather than the avatar itself from the…
… manager Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 601d741 - Browse repository at this point
Copy the full SHA 601d741View commit details -
fixup! Add explicit providers for user and guest avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6391a2b - Browse repository at this point
Copy the full SHA 6391a2bView commit details -
fixup! Add method to check if an avatar can be modified by the curren…
…t user Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 029d22c - Browse repository at this point
Copy the full SHA 029d22cView commit details -
fixup! Add explicit providers for user and guest avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3a4b926 - Browse repository at this point
Copy the full SHA 3a4b926View commit details -
fixup! Make possible to define custom avatar types
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6895199 - Browse repository at this point
Copy the full SHA 6895199View commit details