N
N
Nightmare0582021-04-05 17:45:46
Spring
Nightmare058, 2021-04-05 17:45:46

How do I submit an access request?

Good afternoon.
There is a task: there is a file, it has an owner. You need to send a request from another user to gain access.
Can you suggest what solutions are available?
You can link to the documentation or at least the name where to look.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2021-04-05
@azerphoenix

Good afternoon!
It would be nice to describe the problem in more detail so that you can answer more precisely.

there is a file, it has an owner

Where is this file located? What do you mean it has an owner? Simply, for example, the file may lie somewhere on the server and its owner will be a Linux user or the owner will be an Apache user, etc. Or, the owner means a certain entity of the user, which is implemented in Spring.
You need to send a request from another user to gain access.

How does another user see that this user (owner) has the file?
What is the process of granting access to this file? Those. give a link to download this file simply or, for example, give access to edit or only view this file (as in Google Drive || Yandex Disk).
You can link to the documentation or at least the name where to look.

Well, you need to look at the Spring documentation. And also google your question, but with more detail.
I will write pseudocode for clarity, one of the simple solutions:
entity User {
   List<File> uploadedFiles; (OneToMany)
   List<File>  files; (ManyToMany)
}
entity File {
   User owner; (ManyToOne)
   List<User> users; (ManyToMany)
}

uploadedFiles - files uploaded by the user
owner - file owner
files - files to which the user has access
users - users who have access to this file.

Further, the process of granting access to a file is to notify the user (for example, by mail or via push, etc.) with a request to grant access to the specified file. If access is granted by the owner, then the user requesting access is added to the users list for the file he requested.
This is the most primitive option that can be implemented. Of course, if integration with AWS is supposed, then additional manipulations may be required.
And so for a more objective and detailed answer, you need more information about the product and the goal you want to achieve.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question