package com.atlassian.bitbucket.permission;

import com.atlassian.bitbucket.user.ApplicationUser;

import javax.annotation.Nonnull;

/**
 * Provides {@link EffectivePermission}s for a {@link ApplicationUser user} in addition to those already granted to
 * them through direct grant, group membership and default permissions.
 *
 * @since 4.1
 */
public interface EffectivePermissionsProvider {
    /**
     * @param user the user
     * @return the additional effective permissions to be granted to the user at login
     */
    @Nonnull
    Iterable<EffectivePermission> getPermissions(@Nonnull ApplicationUser user);
}
