aboutsummaryrefslogtreecommitdiff
path: root/src/Data/DevHive.Data/Interfaces/IUserRepository.cs
blob: aec0eb398775cb9bab97bfd21675a76fbc3e3d12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DevHive.Data.Models;
using DevHive.Data.Repositories.Interfaces;

namespace DevHive.Data.Interfaces
{
	public interface IUserRepository : IRepository<User>
	{
		Task<bool> AddRoleToUser(User user, string roleName);

		Task<User> GetByUsernameAsync(string username);
		Task<bool> UpdateProfilePicture(Guid userId, string pictureUrl);

		Task<bool> VerifyPassword(User user, string password);
		Task<bool> IsInRoleAsync(User user, string roleName);
		Task<bool> ValidateFriendsCollectionAsync(List<string> usernames);
		Task<bool> DoesEmailExistAsync(string email);
		Task<bool> DoesUserExistAsync(Guid id);
		Task<bool> DoesUsernameExistAsync(string username);
		Task<bool> DoesUserHaveThisUsernameAsync(Guid id, string username);
	}
}