png pciture can't be seen, i copy it there.
/**
* Adds a new group.
*
* @param group the Group to add
* @return the added Group
* @throws AuthorizationAccessException if there was an unexpected error
performing the operation
* @throws IllegalStateException if a group with the same name already
exists
*/
public final synchronized Group addGroup(Group group) throws
AuthorizationAccessException {
if (tenantExists(group.getIdentifier(), group.getName())) {
throw new IllegalStateException(String.format("User/user group
already exists with the identity '%s'.", group.getName()));
}
return doAddGroup(group);
}
From: Andy LoPresto
Date: 2017-08-02 14:01
To: dev
Subject: Re: a question about nifi's source code
Hi YuNing,
The Abstract policy authorizer delegates the updateGroup action to
doUpdateGroup, which is implemented by the extending concrete class. I'm not
sure where you are seeing that it checks for the absence of the group, but
there is an addGroup method for adding a new group.
Andy LoPresto
[email protected]
[email protected]
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69
> On Aug 1, 2017, at 19:48, YuNing <[email protected]> wrote:
>
> Hello,everyone
> I am work on reading nifi's source code . it confuse me when i read
> the class "AbstractPolicyBasedAuthorizer", I found there is no method to add
> a user to an existing group. I noticed there is an "updateGroup" method
> ,which i don't think can be used to add users to existing group, because it
> checks the input group to make sure it didn't exist.
> Am i right? can anyone help me, thanks alot !
>
> Best Regards
> YuNing
>