You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dolphinscheduler.apache.org by wenhemin <wh...@163.com> on 2020/05/05 00:13:30 UTC

Re: [DISCUSS] Add "state" field to table t_ds_user

First, the purpose of disabling the user is that the user does not have permission to log in to the system.

1. If it was created by the user, the user cannot be used after being disabled. If the permissions have been assigned to other users, there should be an admin operation to revoke the permissions.
I think, in business, most processes should not be automatically disabled or deleted.

2. After the user is disabled. Because you can no longer log in to the system. So, you can't create a project.

> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
> 
> 
> Great,I think we can discuss the other aspect. If add the `state` in table t_ds_user.It will also change other places.
> Such as the following.
> 1、If a user created the process definition or resource or datasource,We change the user state from enable to disable,the resource or datasource should also disable.
> 2、If a user is disable,Whether it can create the resource or datasource?
> 
> 
> DolphinScheduler(Incubator) PPMC
> Gang Li 李岗
> 
> lgcareer2019@outlook.com<ma...@outlook.com>
> 
> 发件人: wenhemin
> 发送时间: 2020-04-26 11:23
> 收件人: dev
> 主题: [DISCUSS] Add "state" field to table t_ds_user
> hello, friends!
> 
> The issue: https://github.com/apache/incubator-dolphinscheduler/issues/1923 <https://github.com/apache/incubator-dolphinscheduler/issues/1923>
> Need to add a “state” field, Control whether users can log in to the system.
> 
> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT 'state 0:disable 1:enable';
> 
> The PR: https://github.com/apache/incubator-dolphinscheduler/pull/2424 <https://github.com/apache/incubator-dolphinscheduler/pull/2424>



回复: Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by "lgcareer2019@outlook.com" <lg...@outlook.com>.
I have created the issue[1] about `add the logic delete feature`.

1.https://github.com/apache/incubator-dolphinscheduler/issues/2668

@wenhemin 
Ok, I have reviewd it and saw some other commiters reviewd it,I have merged it.




DolphinScheduler(Incubator) PPMC
Gang Li 李岗

lgcareer2019@outlook.com<ma...@outlook.com>
 
发件人: wenhemin
发送时间: 2020-05-11 10:56
收件人: dev
主题: Re: [DISCUSS] Add "state" field to table t_ds_user
https://github.com/apache/incubator-dolphinscheduler/pull/2424 <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
This issue has been open for a long time, this issue solved the first conclusion, I think it can be merged.
The second conclusion and then build new PR.
 
> 在 2020年5月9日,18:57,lgcareer2019@outlook.com 写道:
> 
> @leon bao @wenhemin 
> After our discuss,I think the final conclusion are the following.
> 
> 1.Disable and enable state just  restricted to verify whether a user has permission to login.
> 2.Delete the user logically means the following
>  (1)Just do not show this user on the page.
>  (2)Do not check and do not operate the resource/projects/datasource.
> 
> I will create another issue to descirbe the logic delete feature. 
> 
> 
> 
> DolphinScheduler(Incubator) PPMC
> Gang Li 李岗
> 
> lgcareer2019@outlook.com<ma...@outlook.com>
> 
> From: leon bao
> Date: 2020-05-09 13:51
> To: dev
> Subject: Re: Re: [DISCUSS] Add "state" field to table t_ds_user
> @lgcareer2019
> 
> yes, that’s what i want to say.
> 
> lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五 下午7:05写道:
> 
>> @leon bao
>> From the perspective of this example that empolyee leaved company and
>> don't work at this company.
>> 
>> I think your mean is if the user is logic deletd,All the things that the
>> user created will be used normally by other users or other entities.
>> And it also means  alougth  the user is logic deleted,we didn't need
>> filter it when query resources or datasources and so on.
>> 
>> If the above is what you expressd,I agree with it.
>> 
>> 
>> 
>> 
>> 
>> 
>> DolphinScheduler(Incubator) PPMC
>> Gang Li 李岗
>> 
>> lgcareer2019@outlook.com<ma...@outlook.com>
>> 
>> 发件人: wenhemin
>> 发送时间: 2020-05-08 14:21
>> 收件人: dev
>> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
>> I agree.
>> As far as I know, The future permission module will redesign.
>> Suggest, after this is completed, consider again to achieve.
>> 
>>> 在 2020年5月8日,11:58,leon bao <le...@apache.org> 写道:
>>> 
>>> some opinions about:
>>> 2.Delete state need to do some other work.If the user is deleted,query
>> the
>>> resources or datasources and so on need filter the user which state is
>>> `delete`.
>>> 
>>> If there is an employee who has worked for N years leaves, what should
>>> administrator do?
>>> 1. disable the leave account ---- yes, this has no impact on the existing
>>> business
>>> 2. delete the leave account  --- all the existing business cannot work
>>> anymore!
>>> 
>>> at present, authority control of project/resources/datasource is
>> separate,
>>> so i think the logic of deleting user should be
>>> 1. just do not show this user on the page
>>> 2. do not check and do not operate the resource/projects/datasource,
>>> because there have another resource/project/datasource management page.
>>> 
>>> 
>>> 
>>> 
>>> lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五
>> 上午11:12写道:
>>> 
>>>> @leon bao @wenhemin So great,it looks like clearly.
>>>> We can try give a consensus.
>>>> 
>>>> 1.Disable and enable state just  restricted to verify whether a user has
>>>> permission to login.
>>>> 2.Delete state need to do some other work.If the user is deleted,query
>> the
>>>> resources or datasources and so on need filter the user which state is
>>>> `delete`.
>>>> 
>>>> Whether agree with the above?
>>>> Weclome every one of dev team discuss the above,If we agree with it.I
>>>> think we can try to give detail develop work next step.Such as who will
>>>> develop the second,maybe need one or several do it.
>>>> 
>>>> 
>>>> 
>>>> DolphinScheduler(Incubator) PPMC
>>>> Gang Li 李岗
>>>> 
>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>> 
>>>> From: leon bao
>>>> Date: 2020-05-08 10:51
>>>> To: dev
>>>> Subject: Re: [DISCUSS] Add "state" field to table t_ds_user
>>>> agree wenhemin
>>>> 1.  disable state  just limit use login.
>>>> 2.  in business, the disable users processes/resources can worker
>> normally,
>>>> if no use anymore, administrator can handle that.
>>>> 
>>>> wenhemin <wh...@163.com> 于2020年5月7日周四 下午8:21写道:
>>>> 
>>>>> What you said makes sense.
>>>>> But I think filter condition should be to add when delete user.
>>>>> The state has 3 values, 0: disable 1: enable 2: delete (add filter
>>>>> condition, prompt before deleting).
>>>>> Disabling users and disabling processes、resources can easily cause
>>>>> problems. I think this is not the result expected by the business.
>>>>> 
>>>>> 
>>>>>> 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
>>>>>> 
>>>>>> So sorry for discussing in time.
>>>>>> I think your mean is the `state` of the user is restricted to verify
>>>>> whether a user has permission to login.
>>>>>> 
>>>>>> What I expressed int the last email is the following means.
>>>>>> Because the user has not state before,so the sql of query the
>>>>> datasources、resources、process definitons、projects needn't filter
>> `state`
>>>>> field.
>>>>>> Now if add the `state`,the above query functions whether need add
>>>> `where
>>>>> state=?` ?
>>>>>> 
>>>>>> If one user created all datasources,resources and projects.
>>>>>> Whether the state` of  a user change the avaiablility of all things
>> one
>>>>> user created?
>>>>>> 
>>>>>> If it will change,We will add `where state=?` in all query functions.
>>>>>> If it will not change,we will not change the query functions.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> DolphinScheduler(Incubator) PPMC
>>>>>> Gang Li 李岗
>>>>>> 
>>>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>>>> 
>>>>>> 发件人: wenhemin
>>>>>> 发送时间: 2020-05-05 08:13
>>>>>> 收件人: dev
>>>>>> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
>>>>>> First, the purpose of disabling the user is that the user does not
>> have
>>>>> permission to log in to the system.
>>>>>> 
>>>>>> 1. If it was created by the user, the user cannot be used after being
>>>>> disabled. If the permissions have been assigned to other users, there
>>>>> should be an admin operation to revoke the permissions.
>>>>>> I think, in business, most processes should not be automatically
>>>>> disabled or deleted.
>>>>>> 
>>>>>> 2. After the user is disabled. Because you can no longer log in to the
>>>>> system. So, you can't create a project.
>>>>>> 
>>>>>>> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
>>>>>>> 
>>>>>>> 
>>>>>>> Great,I think we can discuss the other aspect. If add the `state` in
>>>>> table t_ds_user.It will also change other places.
>>>>>>> Such as the following.
>>>>>>> 1、If a user created the process definition or resource or
>>>> datasource,We
>>>>> change the user state from enable to disable,the resource or datasource
>>>>> should also disable.
>>>>>>> 2、If a user is disable,Whether it can create the resource or
>>>> datasource?
>>>>>>> 
>>>>>>> 
>>>>>>> DolphinScheduler(Incubator) PPMC
>>>>>>> Gang Li 李岗
>>>>>>> 
>>>>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>>>>> 
>>>>>>> 发件人: wenhemin
>>>>>>> 发送时间: 2020-04-26 11:23
>>>>>>> 收件人: dev
>>>>>>> 主题: [DISCUSS] Add "state" field to table t_ds_user
>>>>>>> hello, friends!
>>>>>>> 
>>>>>>> The issue:
>>>>> https://github.com/apache/incubator-dolphinscheduler/issues/1923 <
>>>>> https://github.com/apache/incubator-dolphinscheduler/issues/1923>
>>>>>>> Need to add a “state” field, Control whether users can log in to the
>>>>> system.
>>>>>>> 
>>>>>>> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT
>>>> 'state
>>>>> 0:disable 1:enable';
>>>>>>> 
>>>>>>> The PR:
>>>> https://github.com/apache/incubator-dolphinscheduler/pull/2424
>>>>> <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> --
>>>> DolphinScheduler(Incubator)  PPMC
>>>> BaoLiang 鲍亮
>>>> leonbao@apache.org
>>>> 
>>> 
>>> 
>>> --
>>> DolphinScheduler(Incubator)  PPMC
>>> BaoLiang 鲍亮
>>> leonbao@apache.org
>> 
>> 
> 
> -- 
> DolphinScheduler(Incubator)  PPMC
> BaoLiang 鲍亮
> leonbao@apache.org
 

Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by wenhemin <wh...@163.com>.
https://github.com/apache/incubator-dolphinscheduler/pull/2424 <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
This issue has been open for a long time, this issue solved the first conclusion, I think it can be merged.
The second conclusion and then build new PR.

> 在 2020年5月9日,18:57,lgcareer2019@outlook.com 写道:
> 
> @leon bao @wenhemin 
> After our discuss,I think the final conclusion are the following.
> 
> 1.Disable and enable state just  restricted to verify whether a user has permission to login.
> 2.Delete the user logically means the following
>  (1)Just do not show this user on the page.
>  (2)Do not check and do not operate the resource/projects/datasource.
> 
> I will create another issue to descirbe the logic delete feature. 
> 
> 
> 
> DolphinScheduler(Incubator) PPMC
> Gang Li 李岗
> 
> lgcareer2019@outlook.com<ma...@outlook.com>
> 
> From: leon bao
> Date: 2020-05-09 13:51
> To: dev
> Subject: Re: Re: [DISCUSS] Add "state" field to table t_ds_user
> @lgcareer2019
> 
> yes, that’s what i want to say.
> 
> lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五 下午7:05写道:
> 
>> @leon bao
>> From the perspective of this example that empolyee leaved company and
>> don't work at this company.
>> 
>> I think your mean is if the user is logic deletd,All the things that the
>> user created will be used normally by other users or other entities.
>> And it also means  alougth  the user is logic deleted,we didn't need
>> filter it when query resources or datasources and so on.
>> 
>> If the above is what you expressd,I agree with it.
>> 
>> 
>> 
>> 
>> 
>> 
>> DolphinScheduler(Incubator) PPMC
>> Gang Li 李岗
>> 
>> lgcareer2019@outlook.com<ma...@outlook.com>
>> 
>> 发件人: wenhemin
>> 发送时间: 2020-05-08 14:21
>> 收件人: dev
>> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
>> I agree.
>> As far as I know, The future permission module will redesign.
>> Suggest, after this is completed, consider again to achieve.
>> 
>>> 在 2020年5月8日,11:58,leon bao <le...@apache.org> 写道:
>>> 
>>> some opinions about:
>>> 2.Delete state need to do some other work.If the user is deleted,query
>> the
>>> resources or datasources and so on need filter the user which state is
>>> `delete`.
>>> 
>>> If there is an employee who has worked for N years leaves, what should
>>> administrator do?
>>> 1. disable the leave account ---- yes, this has no impact on the existing
>>> business
>>> 2. delete the leave account  --- all the existing business cannot work
>>> anymore!
>>> 
>>> at present, authority control of project/resources/datasource is
>> separate,
>>> so i think the logic of deleting user should be
>>> 1. just do not show this user on the page
>>> 2. do not check and do not operate the resource/projects/datasource,
>>> because there have another resource/project/datasource management page.
>>> 
>>> 
>>> 
>>> 
>>> lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五
>> 上午11:12写道:
>>> 
>>>> @leon bao @wenhemin So great,it looks like clearly.
>>>> We can try give a consensus.
>>>> 
>>>> 1.Disable and enable state just  restricted to verify whether a user has
>>>> permission to login.
>>>> 2.Delete state need to do some other work.If the user is deleted,query
>> the
>>>> resources or datasources and so on need filter the user which state is
>>>> `delete`.
>>>> 
>>>> Whether agree with the above?
>>>> Weclome every one of dev team discuss the above,If we agree with it.I
>>>> think we can try to give detail develop work next step.Such as who will
>>>> develop the second,maybe need one or several do it.
>>>> 
>>>> 
>>>> 
>>>> DolphinScheduler(Incubator) PPMC
>>>> Gang Li 李岗
>>>> 
>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>> 
>>>> From: leon bao
>>>> Date: 2020-05-08 10:51
>>>> To: dev
>>>> Subject: Re: [DISCUSS] Add "state" field to table t_ds_user
>>>> agree wenhemin
>>>> 1.  disable state  just limit use login.
>>>> 2.  in business, the disable users processes/resources can worker
>> normally,
>>>> if no use anymore, administrator can handle that.
>>>> 
>>>> wenhemin <wh...@163.com> 于2020年5月7日周四 下午8:21写道:
>>>> 
>>>>> What you said makes sense.
>>>>> But I think filter condition should be to add when delete user.
>>>>> The state has 3 values, 0: disable 1: enable 2: delete (add filter
>>>>> condition, prompt before deleting).
>>>>> Disabling users and disabling processes、resources can easily cause
>>>>> problems. I think this is not the result expected by the business.
>>>>> 
>>>>> 
>>>>>> 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
>>>>>> 
>>>>>> So sorry for discussing in time.
>>>>>> I think your mean is the `state` of the user is restricted to verify
>>>>> whether a user has permission to login.
>>>>>> 
>>>>>> What I expressed int the last email is the following means.
>>>>>> Because the user has not state before,so the sql of query the
>>>>> datasources、resources、process definitons、projects needn't filter
>> `state`
>>>>> field.
>>>>>> Now if add the `state`,the above query functions whether need add
>>>> `where
>>>>> state=?` ?
>>>>>> 
>>>>>> If one user created all datasources,resources and projects.
>>>>>> Whether the state` of  a user change the avaiablility of all things
>> one
>>>>> user created?
>>>>>> 
>>>>>> If it will change,We will add `where state=?` in all query functions.
>>>>>> If it will not change,we will not change the query functions.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> DolphinScheduler(Incubator) PPMC
>>>>>> Gang Li 李岗
>>>>>> 
>>>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>>>> 
>>>>>> 发件人: wenhemin
>>>>>> 发送时间: 2020-05-05 08:13
>>>>>> 收件人: dev
>>>>>> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
>>>>>> First, the purpose of disabling the user is that the user does not
>> have
>>>>> permission to log in to the system.
>>>>>> 
>>>>>> 1. If it was created by the user, the user cannot be used after being
>>>>> disabled. If the permissions have been assigned to other users, there
>>>>> should be an admin operation to revoke the permissions.
>>>>>> I think, in business, most processes should not be automatically
>>>>> disabled or deleted.
>>>>>> 
>>>>>> 2. After the user is disabled. Because you can no longer log in to the
>>>>> system. So, you can't create a project.
>>>>>> 
>>>>>>> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
>>>>>>> 
>>>>>>> 
>>>>>>> Great,I think we can discuss the other aspect. If add the `state` in
>>>>> table t_ds_user.It will also change other places.
>>>>>>> Such as the following.
>>>>>>> 1、If a user created the process definition or resource or
>>>> datasource,We
>>>>> change the user state from enable to disable,the resource or datasource
>>>>> should also disable.
>>>>>>> 2、If a user is disable,Whether it can create the resource or
>>>> datasource?
>>>>>>> 
>>>>>>> 
>>>>>>> DolphinScheduler(Incubator) PPMC
>>>>>>> Gang Li 李岗
>>>>>>> 
>>>>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>>>>> 
>>>>>>> 发件人: wenhemin
>>>>>>> 发送时间: 2020-04-26 11:23
>>>>>>> 收件人: dev
>>>>>>> 主题: [DISCUSS] Add "state" field to table t_ds_user
>>>>>>> hello, friends!
>>>>>>> 
>>>>>>> The issue:
>>>>> https://github.com/apache/incubator-dolphinscheduler/issues/1923 <
>>>>> https://github.com/apache/incubator-dolphinscheduler/issues/1923>
>>>>>>> Need to add a “state” field, Control whether users can log in to the
>>>>> system.
>>>>>>> 
>>>>>>> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT
>>>> 'state
>>>>> 0:disable 1:enable';
>>>>>>> 
>>>>>>> The PR:
>>>> https://github.com/apache/incubator-dolphinscheduler/pull/2424
>>>>> <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> --
>>>> DolphinScheduler(Incubator)  PPMC
>>>> BaoLiang 鲍亮
>>>> leonbao@apache.org
>>>> 
>>> 
>>> 
>>> --
>>> DolphinScheduler(Incubator)  PPMC
>>> BaoLiang 鲍亮
>>> leonbao@apache.org
>> 
>> 
> 
> -- 
> DolphinScheduler(Incubator)  PPMC
> BaoLiang 鲍亮
> leonbao@apache.org


Re: Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by "lgcareer2019@outlook.com" <lg...@outlook.com>.
@leon bao @wenhemin 
After our discuss,I think the final conclusion are the following.

1.Disable and enable state just  restricted to verify whether a user has permission to login.
2.Delete the user logically means the following
  (1)Just do not show this user on the page.
  (2)Do not check and do not operate the resource/projects/datasource.

I will create another issue to descirbe the logic delete feature. 



DolphinScheduler(Incubator) PPMC
Gang Li 李岗

lgcareer2019@outlook.com<ma...@outlook.com>
 
From: leon bao
Date: 2020-05-09 13:51
To: dev
Subject: Re: Re: [DISCUSS] Add "state" field to table t_ds_user
@lgcareer2019
 
yes, that’s what i want to say.
 
lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五 下午7:05写道:
 
> @leon bao
> From the perspective of this example that empolyee leaved company and
> don't work at this company.
>
> I think your mean is if the user is logic deletd,All the things that the
> user created will be used normally by other users or other entities.
> And it also means  alougth  the user is logic deleted,we didn't need
> filter it when query resources or datasources and so on.
>
> If the above is what you expressd,I agree with it.
>
>
>
>
>
>
> DolphinScheduler(Incubator) PPMC
> Gang Li 李岗
>
> lgcareer2019@outlook.com<ma...@outlook.com>
>
> 发件人: wenhemin
> 发送时间: 2020-05-08 14:21
> 收件人: dev
> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
> I agree.
> As far as I know, The future permission module will redesign.
> Suggest, after this is completed, consider again to achieve.
>
> > 在 2020年5月8日,11:58,leon bao <le...@apache.org> 写道:
> >
> > some opinions about:
> > 2.Delete state need to do some other work.If the user is deleted,query
> the
> > resources or datasources and so on need filter the user which state is
> > `delete`.
> >
> > If there is an employee who has worked for N years leaves, what should
> > administrator do?
> > 1. disable the leave account ---- yes, this has no impact on the existing
> > business
> > 2. delete the leave account  --- all the existing business cannot work
> > anymore!
> >
> > at present, authority control of project/resources/datasource is
> separate,
> > so i think the logic of deleting user should be
> > 1. just do not show this user on the page
> > 2. do not check and do not operate the resource/projects/datasource,
> > because there have another resource/project/datasource management page.
> >
> >
> >
> >
> > lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五
> 上午11:12写道:
> >
> >> @leon bao @wenhemin So great,it looks like clearly.
> >> We can try give a consensus.
> >>
> >> 1.Disable and enable state just  restricted to verify whether a user has
> >> permission to login.
> >> 2.Delete state need to do some other work.If the user is deleted,query
> the
> >> resources or datasources and so on need filter the user which state is
> >> `delete`.
> >>
> >> Whether agree with the above?
> >> Weclome every one of dev team discuss the above,If we agree with it.I
> >> think we can try to give detail develop work next step.Such as who will
> >> develop the second,maybe need one or several do it.
> >>
> >>
> >>
> >> DolphinScheduler(Incubator) PPMC
> >> Gang Li 李岗
> >>
> >> lgcareer2019@outlook.com<ma...@outlook.com>
> >>
> >> From: leon bao
> >> Date: 2020-05-08 10:51
> >> To: dev
> >> Subject: Re: [DISCUSS] Add "state" field to table t_ds_user
> >> agree wenhemin
> >> 1.  disable state  just limit use login.
> >> 2.  in business, the disable users processes/resources can worker
> normally,
> >> if no use anymore, administrator can handle that.
> >>
> >> wenhemin <wh...@163.com> 于2020年5月7日周四 下午8:21写道:
> >>
> >>> What you said makes sense.
> >>> But I think filter condition should be to add when delete user.
> >>> The state has 3 values, 0: disable 1: enable 2: delete (add filter
> >>> condition, prompt before deleting).
> >>> Disabling users and disabling processes、resources can easily cause
> >>> problems. I think this is not the result expected by the business.
> >>>
> >>>
> >>>> 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
> >>>>
> >>>> So sorry for discussing in time.
> >>>> I think your mean is the `state` of the user is restricted to verify
> >>> whether a user has permission to login.
> >>>>
> >>>> What I expressed int the last email is the following means.
> >>>> Because the user has not state before,so the sql of query the
> >>> datasources、resources、process definitons、projects needn't filter
> `state`
> >>> field.
> >>>> Now if add the `state`,the above query functions whether need add
> >> `where
> >>> state=?` ?
> >>>>
> >>>> If one user created all datasources,resources and projects.
> >>>> Whether the state` of  a user change the avaiablility of all things
> one
> >>> user created?
> >>>>
> >>>> If it will change,We will add `where state=?` in all query functions.
> >>>> If it will not change,we will not change the query functions.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> DolphinScheduler(Incubator) PPMC
> >>>> Gang Li 李岗
> >>>>
> >>>> lgcareer2019@outlook.com<ma...@outlook.com>
> >>>>
> >>>> 发件人: wenhemin
> >>>> 发送时间: 2020-05-05 08:13
> >>>> 收件人: dev
> >>>> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
> >>>> First, the purpose of disabling the user is that the user does not
> have
> >>> permission to log in to the system.
> >>>>
> >>>> 1. If it was created by the user, the user cannot be used after being
> >>> disabled. If the permissions have been assigned to other users, there
> >>> should be an admin operation to revoke the permissions.
> >>>> I think, in business, most processes should not be automatically
> >>> disabled or deleted.
> >>>>
> >>>> 2. After the user is disabled. Because you can no longer log in to the
> >>> system. So, you can't create a project.
> >>>>
> >>>>> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
> >>>>>
> >>>>>
> >>>>> Great,I think we can discuss the other aspect. If add the `state` in
> >>> table t_ds_user.It will also change other places.
> >>>>> Such as the following.
> >>>>> 1、If a user created the process definition or resource or
> >> datasource,We
> >>> change the user state from enable to disable,the resource or datasource
> >>> should also disable.
> >>>>> 2、If a user is disable,Whether it can create the resource or
> >> datasource?
> >>>>>
> >>>>>
> >>>>> DolphinScheduler(Incubator) PPMC
> >>>>> Gang Li 李岗
> >>>>>
> >>>>> lgcareer2019@outlook.com<ma...@outlook.com>
> >>>>>
> >>>>> 发件人: wenhemin
> >>>>> 发送时间: 2020-04-26 11:23
> >>>>> 收件人: dev
> >>>>> 主题: [DISCUSS] Add "state" field to table t_ds_user
> >>>>> hello, friends!
> >>>>>
> >>>>> The issue:
> >>> https://github.com/apache/incubator-dolphinscheduler/issues/1923 <
> >>> https://github.com/apache/incubator-dolphinscheduler/issues/1923>
> >>>>> Need to add a “state” field, Control whether users can log in to the
> >>> system.
> >>>>>
> >>>>> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT
> >> 'state
> >>> 0:disable 1:enable';
> >>>>>
> >>>>> The PR:
> >> https://github.com/apache/incubator-dolphinscheduler/pull/2424
> >>> <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>
> >> --
> >> DolphinScheduler(Incubator)  PPMC
> >> BaoLiang 鲍亮
> >> leonbao@apache.org
> >>
> >
> >
> > --
> > DolphinScheduler(Incubator)  PPMC
> > BaoLiang 鲍亮
> > leonbao@apache.org
>
>
 
-- 
DolphinScheduler(Incubator)  PPMC
BaoLiang 鲍亮
leonbao@apache.org

Re: Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by leon bao <le...@apache.org>.
@lgcareer2019

yes, that’s what i want to say.

lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五 下午7:05写道:

> @leon bao
> From the perspective of this example that empolyee leaved company and
> don't work at this company.
>
> I think your mean is if the user is logic deletd,All the things that the
> user created will be used normally by other users or other entities.
> And it also means  alougth  the user is logic deleted,we didn't need
> filter it when query resources or datasources and so on.
>
> If the above is what you expressd,I agree with it.
>
>
>
>
>
>
> DolphinScheduler(Incubator) PPMC
> Gang Li 李岗
>
> lgcareer2019@outlook.com<ma...@outlook.com>
>
> 发件人: wenhemin
> 发送时间: 2020-05-08 14:21
> 收件人: dev
> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
> I agree.
> As far as I know, The future permission module will redesign.
> Suggest, after this is completed, consider again to achieve.
>
> > 在 2020年5月8日,11:58,leon bao <le...@apache.org> 写道:
> >
> > some opinions about:
> > 2.Delete state need to do some other work.If the user is deleted,query
> the
> > resources or datasources and so on need filter the user which state is
> > `delete`.
> >
> > If there is an employee who has worked for N years leaves, what should
> > administrator do?
> > 1. disable the leave account ---- yes, this has no impact on the existing
> > business
> > 2. delete the leave account  --- all the existing business cannot work
> > anymore!
> >
> > at present, authority control of project/resources/datasource is
> separate,
> > so i think the logic of deleting user should be
> > 1. just do not show this user on the page
> > 2. do not check and do not operate the resource/projects/datasource,
> > because there have another resource/project/datasource management page.
> >
> >
> >
> >
> > lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五
> 上午11:12写道:
> >
> >> @leon bao @wenhemin So great,it looks like clearly.
> >> We can try give a consensus.
> >>
> >> 1.Disable and enable state just  restricted to verify whether a user has
> >> permission to login.
> >> 2.Delete state need to do some other work.If the user is deleted,query
> the
> >> resources or datasources and so on need filter the user which state is
> >> `delete`.
> >>
> >> Whether agree with the above?
> >> Weclome every one of dev team discuss the above,If we agree with it.I
> >> think we can try to give detail develop work next step.Such as who will
> >> develop the second,maybe need one or several do it.
> >>
> >>
> >>
> >> DolphinScheduler(Incubator) PPMC
> >> Gang Li 李岗
> >>
> >> lgcareer2019@outlook.com<ma...@outlook.com>
> >>
> >> From: leon bao
> >> Date: 2020-05-08 10:51
> >> To: dev
> >> Subject: Re: [DISCUSS] Add "state" field to table t_ds_user
> >> agree wenhemin
> >> 1.  disable state  just limit use login.
> >> 2.  in business, the disable users processes/resources can worker
> normally,
> >> if no use anymore, administrator can handle that.
> >>
> >> wenhemin <wh...@163.com> 于2020年5月7日周四 下午8:21写道:
> >>
> >>> What you said makes sense.
> >>> But I think filter condition should be to add when delete user.
> >>> The state has 3 values, 0: disable 1: enable 2: delete (add filter
> >>> condition, prompt before deleting).
> >>> Disabling users and disabling processes、resources can easily cause
> >>> problems. I think this is not the result expected by the business.
> >>>
> >>>
> >>>> 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
> >>>>
> >>>> So sorry for discussing in time.
> >>>> I think your mean is the `state` of the user is restricted to verify
> >>> whether a user has permission to login.
> >>>>
> >>>> What I expressed int the last email is the following means.
> >>>> Because the user has not state before,so the sql of query the
> >>> datasources、resources、process definitons、projects needn't filter
> `state`
> >>> field.
> >>>> Now if add the `state`,the above query functions whether need add
> >> `where
> >>> state=?` ?
> >>>>
> >>>> If one user created all datasources,resources and projects.
> >>>> Whether the state` of  a user change the avaiablility of all things
> one
> >>> user created?
> >>>>
> >>>> If it will change,We will add `where state=?` in all query functions.
> >>>> If it will not change,we will not change the query functions.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> DolphinScheduler(Incubator) PPMC
> >>>> Gang Li 李岗
> >>>>
> >>>> lgcareer2019@outlook.com<ma...@outlook.com>
> >>>>
> >>>> 发件人: wenhemin
> >>>> 发送时间: 2020-05-05 08:13
> >>>> 收件人: dev
> >>>> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
> >>>> First, the purpose of disabling the user is that the user does not
> have
> >>> permission to log in to the system.
> >>>>
> >>>> 1. If it was created by the user, the user cannot be used after being
> >>> disabled. If the permissions have been assigned to other users, there
> >>> should be an admin operation to revoke the permissions.
> >>>> I think, in business, most processes should not be automatically
> >>> disabled or deleted.
> >>>>
> >>>> 2. After the user is disabled. Because you can no longer log in to the
> >>> system. So, you can't create a project.
> >>>>
> >>>>> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
> >>>>>
> >>>>>
> >>>>> Great,I think we can discuss the other aspect. If add the `state` in
> >>> table t_ds_user.It will also change other places.
> >>>>> Such as the following.
> >>>>> 1、If a user created the process definition or resource or
> >> datasource,We
> >>> change the user state from enable to disable,the resource or datasource
> >>> should also disable.
> >>>>> 2、If a user is disable,Whether it can create the resource or
> >> datasource?
> >>>>>
> >>>>>
> >>>>> DolphinScheduler(Incubator) PPMC
> >>>>> Gang Li 李岗
> >>>>>
> >>>>> lgcareer2019@outlook.com<ma...@outlook.com>
> >>>>>
> >>>>> 发件人: wenhemin
> >>>>> 发送时间: 2020-04-26 11:23
> >>>>> 收件人: dev
> >>>>> 主题: [DISCUSS] Add "state" field to table t_ds_user
> >>>>> hello, friends!
> >>>>>
> >>>>> The issue:
> >>> https://github.com/apache/incubator-dolphinscheduler/issues/1923 <
> >>> https://github.com/apache/incubator-dolphinscheduler/issues/1923>
> >>>>> Need to add a “state” field, Control whether users can log in to the
> >>> system.
> >>>>>
> >>>>> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT
> >> 'state
> >>> 0:disable 1:enable';
> >>>>>
> >>>>> The PR:
> >> https://github.com/apache/incubator-dolphinscheduler/pull/2424
> >>> <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>
> >> --
> >> DolphinScheduler(Incubator)  PPMC
> >> BaoLiang 鲍亮
> >> leonbao@apache.org
> >>
> >
> >
> > --
> > DolphinScheduler(Incubator)  PPMC
> > BaoLiang 鲍亮
> > leonbao@apache.org
>
>

-- 
DolphinScheduler(Incubator)  PPMC
BaoLiang 鲍亮
leonbao@apache.org

回复: Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by "lgcareer2019@outlook.com" <lg...@outlook.com>.
@leon bao
From the perspective of this example that empolyee leaved company and don't work at this company.

I think your mean is if the user is logic deletd,All the things that the user created will be used normally by other users or other entities.
And it also means  alougth  the user is logic deleted,we didn't need filter it when query resources or datasources and so on.

If the above is what you expressd,I agree with it.






DolphinScheduler(Incubator) PPMC
Gang Li 李岗

lgcareer2019@outlook.com<ma...@outlook.com>
 
发件人: wenhemin
发送时间: 2020-05-08 14:21
收件人: dev
主题: Re: [DISCUSS] Add "state" field to table t_ds_user
I agree.
As far as I know, The future permission module will redesign.
Suggest, after this is completed, consider again to achieve.
 
> 在 2020年5月8日,11:58,leon bao <le...@apache.org> 写道:
> 
> some opinions about:
> 2.Delete state need to do some other work.If the user is deleted,query the
> resources or datasources and so on need filter the user which state is
> `delete`.
> 
> If there is an employee who has worked for N years leaves, what should
> administrator do?
> 1. disable the leave account ---- yes, this has no impact on the existing
> business
> 2. delete the leave account  --- all the existing business cannot work
> anymore!
> 
> at present, authority control of project/resources/datasource is separate,
> so i think the logic of deleting user should be
> 1. just do not show this user on the page
> 2. do not check and do not operate the resource/projects/datasource,
> because there have another resource/project/datasource management page.
> 
> 
> 
> 
> lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五 上午11:12写道:
> 
>> @leon bao @wenhemin So great,it looks like clearly.
>> We can try give a consensus.
>> 
>> 1.Disable and enable state just  restricted to verify whether a user has
>> permission to login.
>> 2.Delete state need to do some other work.If the user is deleted,query the
>> resources or datasources and so on need filter the user which state is
>> `delete`.
>> 
>> Whether agree with the above?
>> Weclome every one of dev team discuss the above,If we agree with it.I
>> think we can try to give detail develop work next step.Such as who will
>> develop the second,maybe need one or several do it.
>> 
>> 
>> 
>> DolphinScheduler(Incubator) PPMC
>> Gang Li 李岗
>> 
>> lgcareer2019@outlook.com<ma...@outlook.com>
>> 
>> From: leon bao
>> Date: 2020-05-08 10:51
>> To: dev
>> Subject: Re: [DISCUSS] Add "state" field to table t_ds_user
>> agree wenhemin
>> 1.  disable state  just limit use login.
>> 2.  in business, the disable users processes/resources can worker normally,
>> if no use anymore, administrator can handle that.
>> 
>> wenhemin <wh...@163.com> 于2020年5月7日周四 下午8:21写道:
>> 
>>> What you said makes sense.
>>> But I think filter condition should be to add when delete user.
>>> The state has 3 values, 0: disable 1: enable 2: delete (add filter
>>> condition, prompt before deleting).
>>> Disabling users and disabling processes、resources can easily cause
>>> problems. I think this is not the result expected by the business.
>>> 
>>> 
>>>> 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
>>>> 
>>>> So sorry for discussing in time.
>>>> I think your mean is the `state` of the user is restricted to verify
>>> whether a user has permission to login.
>>>> 
>>>> What I expressed int the last email is the following means.
>>>> Because the user has not state before,so the sql of query the
>>> datasources、resources、process definitons、projects needn't filter `state`
>>> field.
>>>> Now if add the `state`,the above query functions whether need add
>> `where
>>> state=?` ?
>>>> 
>>>> If one user created all datasources,resources and projects.
>>>> Whether the state` of  a user change the avaiablility of all things one
>>> user created?
>>>> 
>>>> If it will change,We will add `where state=?` in all query functions.
>>>> If it will not change,we will not change the query functions.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> DolphinScheduler(Incubator) PPMC
>>>> Gang Li 李岗
>>>> 
>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>> 
>>>> 发件人: wenhemin
>>>> 发送时间: 2020-05-05 08:13
>>>> 收件人: dev
>>>> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
>>>> First, the purpose of disabling the user is that the user does not have
>>> permission to log in to the system.
>>>> 
>>>> 1. If it was created by the user, the user cannot be used after being
>>> disabled. If the permissions have been assigned to other users, there
>>> should be an admin operation to revoke the permissions.
>>>> I think, in business, most processes should not be automatically
>>> disabled or deleted.
>>>> 
>>>> 2. After the user is disabled. Because you can no longer log in to the
>>> system. So, you can't create a project.
>>>> 
>>>>> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
>>>>> 
>>>>> 
>>>>> Great,I think we can discuss the other aspect. If add the `state` in
>>> table t_ds_user.It will also change other places.
>>>>> Such as the following.
>>>>> 1、If a user created the process definition or resource or
>> datasource,We
>>> change the user state from enable to disable,the resource or datasource
>>> should also disable.
>>>>> 2、If a user is disable,Whether it can create the resource or
>> datasource?
>>>>> 
>>>>> 
>>>>> DolphinScheduler(Incubator) PPMC
>>>>> Gang Li 李岗
>>>>> 
>>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>>> 
>>>>> 发件人: wenhemin
>>>>> 发送时间: 2020-04-26 11:23
>>>>> 收件人: dev
>>>>> 主题: [DISCUSS] Add "state" field to table t_ds_user
>>>>> hello, friends!
>>>>> 
>>>>> The issue:
>>> https://github.com/apache/incubator-dolphinscheduler/issues/1923 <
>>> https://github.com/apache/incubator-dolphinscheduler/issues/1923>
>>>>> Need to add a “state” field, Control whether users can log in to the
>>> system.
>>>>> 
>>>>> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT
>> 'state
>>> 0:disable 1:enable';
>>>>> 
>>>>> The PR:
>> https://github.com/apache/incubator-dolphinscheduler/pull/2424
>>> <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
>>>> 
>>>> 
>>> 
>>> 
>>> 
>> 
>> --
>> DolphinScheduler(Incubator)  PPMC
>> BaoLiang 鲍亮
>> leonbao@apache.org
>> 
> 
> 
> -- 
> DolphinScheduler(Incubator)  PPMC
> BaoLiang 鲍亮
> leonbao@apache.org
 

Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by wenhemin <wh...@163.com>.
I agree.
As far as I know, The future permission module will redesign.
Suggest, after this is completed, consider again to achieve.

> 在 2020年5月8日,11:58,leon bao <le...@apache.org> 写道:
> 
> some opinions about:
> 2.Delete state need to do some other work.If the user is deleted,query the
> resources or datasources and so on need filter the user which state is
> `delete`.
> 
> If there is an employee who has worked for N years leaves, what should
> administrator do?
> 1. disable the leave account ---- yes, this has no impact on the existing
> business
> 2. delete the leave account  --- all the existing business cannot work
> anymore!
> 
> at present, authority control of project/resources/datasource is separate,
> so i think the logic of deleting user should be
> 1. just do not show this user on the page
> 2. do not check and do not operate the resource/projects/datasource,
> because there have another resource/project/datasource management page.
> 
> 
> 
> 
> lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五 上午11:12写道:
> 
>> @leon bao @wenhemin So great,it looks like clearly.
>> We can try give a consensus.
>> 
>> 1.Disable and enable state just  restricted to verify whether a user has
>> permission to login.
>> 2.Delete state need to do some other work.If the user is deleted,query the
>> resources or datasources and so on need filter the user which state is
>> `delete`.
>> 
>> Whether agree with the above?
>> Weclome every one of dev team discuss the above,If we agree with it.I
>> think we can try to give detail develop work next step.Such as who will
>> develop the second,maybe need one or several do it.
>> 
>> 
>> 
>> DolphinScheduler(Incubator) PPMC
>> Gang Li 李岗
>> 
>> lgcareer2019@outlook.com<ma...@outlook.com>
>> 
>> From: leon bao
>> Date: 2020-05-08 10:51
>> To: dev
>> Subject: Re: [DISCUSS] Add "state" field to table t_ds_user
>> agree wenhemin
>> 1.  disable state  just limit use login.
>> 2.  in business, the disable users processes/resources can worker normally,
>> if no use anymore, administrator can handle that.
>> 
>> wenhemin <wh...@163.com> 于2020年5月7日周四 下午8:21写道:
>> 
>>> What you said makes sense.
>>> But I think filter condition should be to add when delete user.
>>> The state has 3 values, 0: disable 1: enable 2: delete (add filter
>>> condition, prompt before deleting).
>>> Disabling users and disabling processes、resources can easily cause
>>> problems. I think this is not the result expected by the business.
>>> 
>>> 
>>>> 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
>>>> 
>>>> So sorry for discussing in time.
>>>> I think your mean is the `state` of the user is restricted to verify
>>> whether a user has permission to login.
>>>> 
>>>> What I expressed int the last email is the following means.
>>>> Because the user has not state before,so the sql of query the
>>> datasources、resources、process definitons、projects needn't filter `state`
>>> field.
>>>> Now if add the `state`,the above query functions whether need add
>> `where
>>> state=?` ?
>>>> 
>>>> If one user created all datasources,resources and projects.
>>>> Whether the state` of  a user change the avaiablility of all things one
>>> user created?
>>>> 
>>>> If it will change,We will add `where state=?` in all query functions.
>>>> If it will not change,we will not change the query functions.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> DolphinScheduler(Incubator) PPMC
>>>> Gang Li 李岗
>>>> 
>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>> 
>>>> 发件人: wenhemin
>>>> 发送时间: 2020-05-05 08:13
>>>> 收件人: dev
>>>> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
>>>> First, the purpose of disabling the user is that the user does not have
>>> permission to log in to the system.
>>>> 
>>>> 1. If it was created by the user, the user cannot be used after being
>>> disabled. If the permissions have been assigned to other users, there
>>> should be an admin operation to revoke the permissions.
>>>> I think, in business, most processes should not be automatically
>>> disabled or deleted.
>>>> 
>>>> 2. After the user is disabled. Because you can no longer log in to the
>>> system. So, you can't create a project.
>>>> 
>>>>> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
>>>>> 
>>>>> 
>>>>> Great,I think we can discuss the other aspect. If add the `state` in
>>> table t_ds_user.It will also change other places.
>>>>> Such as the following.
>>>>> 1、If a user created the process definition or resource or
>> datasource,We
>>> change the user state from enable to disable,the resource or datasource
>>> should also disable.
>>>>> 2、If a user is disable,Whether it can create the resource or
>> datasource?
>>>>> 
>>>>> 
>>>>> DolphinScheduler(Incubator) PPMC
>>>>> Gang Li 李岗
>>>>> 
>>>>> lgcareer2019@outlook.com<ma...@outlook.com>
>>>>> 
>>>>> 发件人: wenhemin
>>>>> 发送时间: 2020-04-26 11:23
>>>>> 收件人: dev
>>>>> 主题: [DISCUSS] Add "state" field to table t_ds_user
>>>>> hello, friends!
>>>>> 
>>>>> The issue:
>>> https://github.com/apache/incubator-dolphinscheduler/issues/1923 <
>>> https://github.com/apache/incubator-dolphinscheduler/issues/1923>
>>>>> Need to add a “state” field, Control whether users can log in to the
>>> system.
>>>>> 
>>>>> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT
>> 'state
>>> 0:disable 1:enable';
>>>>> 
>>>>> The PR:
>> https://github.com/apache/incubator-dolphinscheduler/pull/2424
>>> <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
>>>> 
>>>> 
>>> 
>>> 
>>> 
>> 
>> --
>> DolphinScheduler(Incubator)  PPMC
>> BaoLiang 鲍亮
>> leonbao@apache.org
>> 
> 
> 
> -- 
> DolphinScheduler(Incubator)  PPMC
> BaoLiang 鲍亮
> leonbao@apache.org


Re: Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by leon bao <le...@apache.org>.
some opinions about:
2.Delete state need to do some other work.If the user is deleted,query the
resources or datasources and so on need filter the user which state is
`delete`.

If there is an employee who has worked for N years leaves, what should
administrator do?
1. disable the leave account ---- yes, this has no impact on the existing
business
2. delete the leave account  --- all the existing business cannot work
anymore!

at present, authority control of project/resources/datasource is separate,
so i think the logic of deleting user should be
1. just do not show this user on the page
2. do not check and do not operate the resource/projects/datasource,
because there have another resource/project/datasource management page.




lgcareer2019@outlook.com <lg...@outlook.com> 于2020年5月8日周五 上午11:12写道:

> @leon bao @wenhemin So great,it looks like clearly.
> We can try give a consensus.
>
> 1.Disable and enable state just  restricted to verify whether a user has
> permission to login.
> 2.Delete state need to do some other work.If the user is deleted,query the
> resources or datasources and so on need filter the user which state is
> `delete`.
>
> Whether agree with the above?
> Weclome every one of dev team discuss the above,If we agree with it.I
> think we can try to give detail develop work next step.Such as who will
> develop the second,maybe need one or several do it.
>
>
>
> DolphinScheduler(Incubator) PPMC
> Gang Li 李岗
>
> lgcareer2019@outlook.com<ma...@outlook.com>
>
> From: leon bao
> Date: 2020-05-08 10:51
> To: dev
> Subject: Re: [DISCUSS] Add "state" field to table t_ds_user
> agree wenhemin
> 1.  disable state  just limit use login.
> 2.  in business, the disable users processes/resources can worker normally,
> if no use anymore, administrator can handle that.
>
> wenhemin <wh...@163.com> 于2020年5月7日周四 下午8:21写道:
>
> > What you said makes sense.
> > But I think filter condition should be to add when delete user.
> > The state has 3 values, 0: disable 1: enable 2: delete (add filter
> > condition, prompt before deleting).
> > Disabling users and disabling processes、resources can easily cause
> > problems. I think this is not the result expected by the business.
> >
> >
> > > 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
> > >
> > > So sorry for discussing in time.
> > > I think your mean is the `state` of the user is restricted to verify
> > whether a user has permission to login.
> > >
> > > What I expressed int the last email is the following means.
> > > Because the user has not state before,so the sql of query the
> > datasources、resources、process definitons、projects needn't filter `state`
> > field.
> > > Now if add the `state`,the above query functions whether need add
> `where
> > state=?` ?
> > >
> > > If one user created all datasources,resources and projects.
> > > Whether the state` of  a user change the avaiablility of all things one
> > user created?
> > >
> > > If it will change,We will add `where state=?` in all query functions.
> > > If it will not change,we will not change the query functions.
> > >
> > >
> > >
> > >
> > > DolphinScheduler(Incubator) PPMC
> > > Gang Li 李岗
> > >
> > > lgcareer2019@outlook.com<ma...@outlook.com>
> > >
> > > 发件人: wenhemin
> > > 发送时间: 2020-05-05 08:13
> > > 收件人: dev
> > > 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
> > > First, the purpose of disabling the user is that the user does not have
> > permission to log in to the system.
> > >
> > > 1. If it was created by the user, the user cannot be used after being
> > disabled. If the permissions have been assigned to other users, there
> > should be an admin operation to revoke the permissions.
> > > I think, in business, most processes should not be automatically
> > disabled or deleted.
> > >
> > > 2. After the user is disabled. Because you can no longer log in to the
> > system. So, you can't create a project.
> > >
> > >> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
> > >>
> > >>
> > >> Great,I think we can discuss the other aspect. If add the `state` in
> > table t_ds_user.It will also change other places.
> > >> Such as the following.
> > >> 1、If a user created the process definition or resource or
> datasource,We
> > change the user state from enable to disable,the resource or datasource
> > should also disable.
> > >> 2、If a user is disable,Whether it can create the resource or
> datasource?
> > >>
> > >>
> > >> DolphinScheduler(Incubator) PPMC
> > >> Gang Li 李岗
> > >>
> > >> lgcareer2019@outlook.com<ma...@outlook.com>
> > >>
> > >> 发件人: wenhemin
> > >> 发送时间: 2020-04-26 11:23
> > >> 收件人: dev
> > >> 主题: [DISCUSS] Add "state" field to table t_ds_user
> > >> hello, friends!
> > >>
> > >> The issue:
> > https://github.com/apache/incubator-dolphinscheduler/issues/1923 <
> > https://github.com/apache/incubator-dolphinscheduler/issues/1923>
> > >> Need to add a “state” field, Control whether users can log in to the
> > system.
> > >>
> > >> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT
> 'state
> > 0:disable 1:enable';
> > >>
> > >> The PR:
> https://github.com/apache/incubator-dolphinscheduler/pull/2424
> > <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
> > >
> > >
> >
> >
> >
>
> --
> DolphinScheduler(Incubator)  PPMC
> BaoLiang 鲍亮
> leonbao@apache.org
>


-- 
DolphinScheduler(Incubator)  PPMC
BaoLiang 鲍亮
leonbao@apache.org

Re: Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by "lgcareer2019@outlook.com" <lg...@outlook.com>.
@leon bao @wenhemin So great,it looks like clearly.
We can try give a consensus.

1.Disable and enable state just  restricted to verify whether a user has permission to login.
2.Delete state need to do some other work.If the user is deleted,query the resources or datasources and so on need filter the user which state is `delete`.

Whether agree with the above?
Weclome every one of dev team discuss the above,If we agree with it.I think we can try to give detail develop work next step.Such as who will develop the second,maybe need one or several do it.



DolphinScheduler(Incubator) PPMC
Gang Li 李岗

lgcareer2019@outlook.com<ma...@outlook.com>
 
From: leon bao
Date: 2020-05-08 10:51
To: dev
Subject: Re: [DISCUSS] Add "state" field to table t_ds_user
agree wenhemin
1.  disable state  just limit use login.
2.  in business, the disable users processes/resources can worker normally,
if no use anymore, administrator can handle that.
 
wenhemin <wh...@163.com> 于2020年5月7日周四 下午8:21写道:
 
> What you said makes sense.
> But I think filter condition should be to add when delete user.
> The state has 3 values, 0: disable 1: enable 2: delete (add filter
> condition, prompt before deleting).
> Disabling users and disabling processes、resources can easily cause
> problems. I think this is not the result expected by the business.
>
>
> > 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
> >
> > So sorry for discussing in time.
> > I think your mean is the `state` of the user is restricted to verify
> whether a user has permission to login.
> >
> > What I expressed int the last email is the following means.
> > Because the user has not state before,so the sql of query the
> datasources、resources、process definitons、projects needn't filter `state`
> field.
> > Now if add the `state`,the above query functions whether need add `where
> state=?` ?
> >
> > If one user created all datasources,resources and projects.
> > Whether the state` of  a user change the avaiablility of all things one
> user created?
> >
> > If it will change,We will add `where state=?` in all query functions.
> > If it will not change,we will not change the query functions.
> >
> >
> >
> >
> > DolphinScheduler(Incubator) PPMC
> > Gang Li 李岗
> >
> > lgcareer2019@outlook.com<ma...@outlook.com>
> >
> > 发件人: wenhemin
> > 发送时间: 2020-05-05 08:13
> > 收件人: dev
> > 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
> > First, the purpose of disabling the user is that the user does not have
> permission to log in to the system.
> >
> > 1. If it was created by the user, the user cannot be used after being
> disabled. If the permissions have been assigned to other users, there
> should be an admin operation to revoke the permissions.
> > I think, in business, most processes should not be automatically
> disabled or deleted.
> >
> > 2. After the user is disabled. Because you can no longer log in to the
> system. So, you can't create a project.
> >
> >> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
> >>
> >>
> >> Great,I think we can discuss the other aspect. If add the `state` in
> table t_ds_user.It will also change other places.
> >> Such as the following.
> >> 1、If a user created the process definition or resource or datasource,We
> change the user state from enable to disable,the resource or datasource
> should also disable.
> >> 2、If a user is disable,Whether it can create the resource or datasource?
> >>
> >>
> >> DolphinScheduler(Incubator) PPMC
> >> Gang Li 李岗
> >>
> >> lgcareer2019@outlook.com<ma...@outlook.com>
> >>
> >> 发件人: wenhemin
> >> 发送时间: 2020-04-26 11:23
> >> 收件人: dev
> >> 主题: [DISCUSS] Add "state" field to table t_ds_user
> >> hello, friends!
> >>
> >> The issue:
> https://github.com/apache/incubator-dolphinscheduler/issues/1923 <
> https://github.com/apache/incubator-dolphinscheduler/issues/1923>
> >> Need to add a “state” field, Control whether users can log in to the
> system.
> >>
> >> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT 'state
> 0:disable 1:enable';
> >>
> >> The PR: https://github.com/apache/incubator-dolphinscheduler/pull/2424
> <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
> >
> >
>
>
>
 
-- 
DolphinScheduler(Incubator)  PPMC
BaoLiang 鲍亮
leonbao@apache.org

Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by leon bao <le...@apache.org>.
agree wenhemin
1.  disable state  just limit use login.
2.  in business, the disable users processes/resources can worker normally,
if no use anymore, administrator can handle that.

wenhemin <wh...@163.com> 于2020年5月7日周四 下午8:21写道:

> What you said makes sense.
> But I think filter condition should be to add when delete user.
> The state has 3 values, 0: disable 1: enable 2: delete (add filter
> condition, prompt before deleting).
> Disabling users and disabling processes、resources can easily cause
> problems. I think this is not the result expected by the business.
>
>
> > 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
> >
> > So sorry for discussing in time.
> > I think your mean is the `state` of the user is restricted to verify
> whether a user has permission to login.
> >
> > What I expressed int the last email is the following means.
> > Because the user has not state before,so the sql of query the
> datasources、resources、process definitons、projects needn't filter `state`
> field.
> > Now if add the `state`,the above query functions whether need add `where
> state=?` ?
> >
> > If one user created all datasources,resources and projects.
> > Whether the state` of  a user change the avaiablility of all things one
> user created?
> >
> > If it will change,We will add `where state=?` in all query functions.
> > If it will not change,we will not change the query functions.
> >
> >
> >
> >
> > DolphinScheduler(Incubator) PPMC
> > Gang Li 李岗
> >
> > lgcareer2019@outlook.com<ma...@outlook.com>
> >
> > 发件人: wenhemin
> > 发送时间: 2020-05-05 08:13
> > 收件人: dev
> > 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
> > First, the purpose of disabling the user is that the user does not have
> permission to log in to the system.
> >
> > 1. If it was created by the user, the user cannot be used after being
> disabled. If the permissions have been assigned to other users, there
> should be an admin operation to revoke the permissions.
> > I think, in business, most processes should not be automatically
> disabled or deleted.
> >
> > 2. After the user is disabled. Because you can no longer log in to the
> system. So, you can't create a project.
> >
> >> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
> >>
> >>
> >> Great,I think we can discuss the other aspect. If add the `state` in
> table t_ds_user.It will also change other places.
> >> Such as the following.
> >> 1、If a user created the process definition or resource or datasource,We
> change the user state from enable to disable,the resource or datasource
> should also disable.
> >> 2、If a user is disable,Whether it can create the resource or datasource?
> >>
> >>
> >> DolphinScheduler(Incubator) PPMC
> >> Gang Li 李岗
> >>
> >> lgcareer2019@outlook.com<ma...@outlook.com>
> >>
> >> 发件人: wenhemin
> >> 发送时间: 2020-04-26 11:23
> >> 收件人: dev
> >> 主题: [DISCUSS] Add "state" field to table t_ds_user
> >> hello, friends!
> >>
> >> The issue:
> https://github.com/apache/incubator-dolphinscheduler/issues/1923 <
> https://github.com/apache/incubator-dolphinscheduler/issues/1923>
> >> Need to add a “state” field, Control whether users can log in to the
> system.
> >>
> >> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT 'state
> 0:disable 1:enable';
> >>
> >> The PR: https://github.com/apache/incubator-dolphinscheduler/pull/2424
> <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
> >
> >
>
>
>

-- 
DolphinScheduler(Incubator)  PPMC
BaoLiang 鲍亮
leonbao@apache.org

Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by wenhemin <wh...@163.com>.
What you said makes sense.
But I think filter condition should be to add when delete user. 
The state has 3 values, 0: disable 1: enable 2: delete (add filter condition, prompt before deleting).
Disabling users and disabling processes、resources can easily cause problems. I think this is not the result expected by the business.


> 在 2020年5月7日,15:59,lgcareer2019@outlook.com 写道:
> 
> So sorry for discussing in time.
> I think your mean is the `state` of the user is restricted to verify whether a user has permission to login.
> 
> What I expressed int the last email is the following means.
> Because the user has not state before,so the sql of query the datasources、resources、process definitons、projects needn't filter `state` field.
> Now if add the `state`,the above query functions whether need add `where state=?` ?
> 
> If one user created all datasources,resources and projects.
> Whether the state` of  a user change the avaiablility of all things one user created?
> 
> If it will change,We will add `where state=?` in all query functions.  
> If it will not change,we will not change the query functions.
> 
> 
> 
> 
> DolphinScheduler(Incubator) PPMC
> Gang Li 李岗
> 
> lgcareer2019@outlook.com<ma...@outlook.com>
> 
> 发件人: wenhemin
> 发送时间: 2020-05-05 08:13
> 收件人: dev
> 主题: Re: [DISCUSS] Add "state" field to table t_ds_user
> First, the purpose of disabling the user is that the user does not have permission to log in to the system.
> 
> 1. If it was created by the user, the user cannot be used after being disabled. If the permissions have been assigned to other users, there should be an admin operation to revoke the permissions.
> I think, in business, most processes should not be automatically disabled or deleted.
> 
> 2. After the user is disabled. Because you can no longer log in to the system. So, you can't create a project.
> 
>> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
>> 
>> 
>> Great,I think we can discuss the other aspect. If add the `state` in table t_ds_user.It will also change other places.
>> Such as the following.
>> 1、If a user created the process definition or resource or datasource,We change the user state from enable to disable,the resource or datasource should also disable.
>> 2、If a user is disable,Whether it can create the resource or datasource?
>> 
>> 
>> DolphinScheduler(Incubator) PPMC
>> Gang Li 李岗
>> 
>> lgcareer2019@outlook.com<ma...@outlook.com>
>> 
>> 发件人: wenhemin
>> 发送时间: 2020-04-26 11:23
>> 收件人: dev
>> 主题: [DISCUSS] Add "state" field to table t_ds_user
>> hello, friends!
>> 
>> The issue: https://github.com/apache/incubator-dolphinscheduler/issues/1923 <https://github.com/apache/incubator-dolphinscheduler/issues/1923>
>> Need to add a “state” field, Control whether users can log in to the system.
>> 
>> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT 'state 0:disable 1:enable';
>> 
>> The PR: https://github.com/apache/incubator-dolphinscheduler/pull/2424 <https://github.com/apache/incubator-dolphinscheduler/pull/2424>
> 
> 



回复: Re: [DISCUSS] Add "state" field to table t_ds_user

Posted by "lgcareer2019@outlook.com" <lg...@outlook.com>.
So sorry for discussing in time.
I think your mean is the `state` of the user is restricted to verify whether a user has permission to login.

What I expressed int the last email is the following means.
Because the user has not state before,so the sql of query the datasources、resources、process definitons、projects needn't filter `state` field.
Now if add the `state`,the above query functions whether need add `where state=?` ?

If one user created all datasources,resources and projects.
Whether the state` of  a user change the avaiablility of all things one user created?

If it will change,We will add `where state=?` in all query functions.  
If it will not change,we will not change the query functions.
 



DolphinScheduler(Incubator) PPMC
Gang Li 李岗

lgcareer2019@outlook.com<ma...@outlook.com>
 
发件人: wenhemin
发送时间: 2020-05-05 08:13
收件人: dev
主题: Re: [DISCUSS] Add "state" field to table t_ds_user
First, the purpose of disabling the user is that the user does not have permission to log in to the system.
 
1. If it was created by the user, the user cannot be used after being disabled. If the permissions have been assigned to other users, there should be an admin operation to revoke the permissions.
I think, in business, most processes should not be automatically disabled or deleted.
 
2. After the user is disabled. Because you can no longer log in to the system. So, you can't create a project.
 
> 在 2020年5月2日,21:42,lgcareer2019@outlook.com 写道:
> 
> 
> Great,I think we can discuss the other aspect. If add the `state` in table t_ds_user.It will also change other places.
> Such as the following.
> 1、If a user created the process definition or resource or datasource,We change the user state from enable to disable,the resource or datasource should also disable.
> 2、If a user is disable,Whether it can create the resource or datasource?
> 
> 
> DolphinScheduler(Incubator) PPMC
> Gang Li 李岗
> 
> lgcareer2019@outlook.com<ma...@outlook.com>
> 
> 发件人: wenhemin
> 发送时间: 2020-04-26 11:23
> 收件人: dev
> 主题: [DISCUSS] Add "state" field to table t_ds_user
> hello, friends!
> 
> The issue: https://github.com/apache/incubator-dolphinscheduler/issues/1923 <https://github.com/apache/incubator-dolphinscheduler/issues/1923>
> Need to add a “state” field, Control whether users can log in to the system.
> 
> Sql : ALTER TABLE t_ds_user ADD `state` int(1) DEFAULT 1 COMMENT 'state 0:disable 1:enable';
> 
> The PR: https://github.com/apache/incubator-dolphinscheduler/pull/2424 <https://github.com/apache/incubator-dolphinscheduler/pull/2424>