package io.digdag.spi;

import io.digdag.client.config.Config;
import org.immutables.value.Value;

@Value.Immutable
public interface AuthenticatedUser
{
    int getSiteId();

    default boolean isAdmin()
    {
        return false;
    }

    Config getUserInfo();

    // this context will not be stored on database instead of userInfo, which is stored as part of wf revision.
    Config getUserContext();

    static ImmutableAuthenticatedUser.Builder builder()
    {
        return ImmutableAuthenticatedUser.builder();
    }
}

@@ -164,24 +164,43 @@
 tSiteId();%0A%0A
+    @Value.Default%0A
     default 

Fix build error on default method with Immutable.