Gitea >= v1.12.0 only need read rights for Colaborators Tab (#542)
show "Add Collaborator" option only if you have the right to do so gitea >= v1.12.0 only need read rights for Colaborators Tab Signed-off-by: 6543 <6543@obermui.de> Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
This commit is contained in:
parent
d2265aecae
commit
1a95475140
@ -196,7 +196,7 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
|||||||
|
|
||||||
// only show Collaborators if you have permission to
|
// only show Collaborators if you have permission to
|
||||||
final View collaboratorTab = vg.getChildAt(8);
|
final View collaboratorTab = vg.getChildAt(8);
|
||||||
if(tinyDb.getBoolean("isRepoAdmin")) {
|
if(tinyDb.getBoolean("isRepoAdmin") || new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
collaboratorTab.setVisibility(View.VISIBLE);
|
collaboratorTab.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -71,13 +71,14 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
addCollaborator.setOnClickListener(new View.OnClickListener() {
|
if (tinyDb.getBoolean("isRepoAdmin")) {
|
||||||
@Override
|
addCollaborator.setOnClickListener(v1 -> {
|
||||||
public void onClick(View v) {
|
bmListener.onButtonClicked("addCollaborator");
|
||||||
bmListener.onButtonClicked("addCollaborator");
|
dismiss();
|
||||||
dismiss();
|
});
|
||||||
}
|
} else {
|
||||||
});
|
addCollaborator.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
createRelease.setOnClickListener(new View.OnClickListener() {
|
createRelease.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user