You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the front-end, resources are owned by different users, each user has his own namespace. user A can't see user B's resource.
But in fact, the back-end is desinged that resources are managed globally. All resources are stored in one table t_ds_resources, and it's PK is full_name and type. It did not distinguish the upload user. If user A uploaded a file named tmp.txt, and then user B want to upload his own file who's name is tmp.txt too, the error occurs, because the two file has the same 'full_name' and 'type', but B did not ever uploaded a file named 'tmp.txt‘ and he don't know why he can't upload the file. The logic of front-end and back-end are not uniform.
If the resource management is designed for the user level, then the front-end is fine, and the back-end must be changed. If the resource management is designed for the overall situation, then the front-end users can see all the uploaded resources.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the front-end, resources are owned by different users, each user has his own namespace. user A can't see user B's resource.
But in fact, the back-end is desinged that resources are managed globally. All resources are stored in one table
t_ds_resources
, and it's PK isfull_name
andtype
. It did not distinguish the upload user. If user A uploaded a file named tmp.txt, and then user B want to upload his own file who's name is tmp.txt too, the error occurs, because the two file has the same 'full_name' and 'type', but B did not ever uploaded a file named 'tmp.txt‘ and he don't know why he can't upload the file. The logic of front-end and back-end are not uniform.资源管理在前台展示的是针对每个用户的,用户拥有自己的空间,其资源只有自己可见,比如A用户无法看到B用户的资源。但是事实上,后台在维护资源信息的时候,是将所有资源统一维护的,存在一张
t_ds_resources
表里,它的主键是full_name
和type
,并没有区分是谁上传的文件。 如果用户A上传了一个名字叫做tmp.txt
的文件,B用户也上传tmp.txt
文件,这时就会报错,因为两个文件主键相同,但是B从未上传过这个文件,他也不知道为什么无法上传。由此看来,前台和后台的逻辑是不太统一的。If the resource management is designed for the user level, then the front-end is fine, and the back-end must be changed. If the resource management is designed for the overall situation, then the front-end users can see all the uploaded resources.
如果资源管理是针对用户级别设计的,那么前台是没问题的,后台就要进行改动。如果资源管理是针对全局设计的,那么前台用户就能看到所有已上传的资源。
Beta Was this translation helpful? Give feedback.
All reactions